[Bug debug/78835] [7 regression] ICE with -fdebug-types-section and member function
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 16 12:51:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78835
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So initially we generate
DIE 0: DW_TAG_GNU_call_site (0x7ffff68cd690)
abbrev id: 0 offset: 0 mark: 0
DW_AT_low_pc: label: *.LVL1
DW_AT_abstract_origin: address
but that later gets rewritten invalidly where Jakub points out. The regression
is because we prune the DIE for Baz as unused after
/* Generate separate COMDAT sections for type DIEs. */
if (use_debug_types)
{
break_out_comdat_types (comp_unit_die ());
... now it is in a type unit ...
/* In the process of copying declarations from one unit to another,
we may have left some declarations behind that are no longer
referenced. Prune them. */
prune_unused_types ();
}
... and gets pruned. But nothing adjusts what the decl refers to via
lookup_decl_die (not sure if we are supposed to adjust sth here).
Previously the call-site attribute kept the DIE live in the main CU DIE so
we had duplicate DIEs in the type unit plus the main CU. With -gstrict-dwarf
it is only on the type unit as expected.
More information about the Gcc-bugs
mailing list