On Fri, Aug 15, 2014 at 9:59 PM, Aldy Hernandez wrote: > So... I've been getting my feet wet with LTO and debugging and I noticed a > seemingly unrelated yet annoying problem. On x86-64, > gcc.dg/guality/pr48437.c fails when run in LTO mode.
Eh, sorry I can't actually answer your question but, eh... Isn't the only real solution: to generate this kind of DIEs earlier (maybe already immediately after parsing) and stream them? Otherwise, how can this possibly be made to work with multi-language LTO? It seems to me that only the lowest-level DWARF (things we don't know about until RTL, like CFI) should be done at link time. Things like scoping and types are language dependent and have to be generated before streaming. Again, sorry for not actually being helpful - just a thought ;-) Ciao! Steven