This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/53470] [4.8 Regression] ICE when linking with -g in splice_child_die, at dwarf2out.c:4264
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Jun 2012 18:07:14 +0000
- Subject: [Bug debug/53470] [4.8 Regression] ICE when linking with -g in splice_child_die, at dwarf2out.c:4264
- Auto-submitted: auto-generated
- References: <bug-53470-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53470
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-05 18:07:14 UTC ---
OK, here's the problem:
free_lang_data_in_type clears TYPE_CONTEXT of Holder.
gen_tagged_type_die tries to emit an enclosing class first, but since
TYPE_CONTEXT is null, it thinks Holder isn't a nested class.
gen_struct_or_union_type_die calls scope_die_for, which forces out
ExtensionCord, which also generates a DIE for Holder.
gen_struct_or_union_type_die contiues to generate what is now a duplicate DIE
for Holder.
What is the rationale for clearing TYPE_CONTEXT of Holder? It seems quite
deliberate, but there's no comment explaining why it would be a good idea.