On 04/24/2015 10:52 AM, Aldy Hernandez wrote: > In the debug-early work we call dwarf2out early from > rest_of_decl_compilation. > Dwarf2out, via gen_struct_or_union_type_die(), will eventually look at > TYPE_VFIELD, which is currently being overloaded by the C front-end to keep > incomplete variables. > > Nobody should be looking at the type too in depth if it's incomplete, but in > this case, the type has just been laid out (layout_decl) so it's considered > complete, just as we're about to iterate through C_TYPE_INCOMPLETE_VARS and > fix > things up. > > To fix my dwarf problem, I've just cached C_TYPE_INCOMPLETE_VARS and > immediately clear it, as it was going to be cleared after anyhow.
The patch is ok. r~ > > Attached is what I'm committing to the branch, but ideally y'all^Wyall > front-end folks should use some language specific node. Nothing was obvious > in > tree-core.h, as most front-end specific things are flags (booleans), so I've > left this as an exercise to the front-end groupie. That being said, if you > violently oppose this solution, I'd be more than happy to entertain another > (hopefully simple) approach. > > Aldy > > p.s. I wonder how many things are being overloaded by the front-end that are > being looked at by dwarf2out incorrectly. Well, nothing that triggers a gdb > regression....