> clang/X11 does not crash (-g -O2).

This is indeed an important result, so it's quite sure that we have an Aqua/Carbon only problem, although the reason is not yet 100% clear.

> gcc6 will not compile the core foundation headers, so gcc/X11 is the best we can do for testing with gcc rather than clang.

I know that gcc on Mac is normally nothing else than a modified (by Apple) clang compiler - or do you use a real gcc, on Mac this is a bit unclear. So it's unbelievable that it won't compiler the core foundation headers, if it is a modified clang. Probably it's only a clash with the Tk header files? Please attach a compilation log, with a bit luck I can see a solution, I'm very familiar with the Tk stuff.