This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/46123] [4.5/4.6 Regression] ICE: in output_aranges, at dwarf2out.c:11531 with -feliminate-dwarf2-dups -g
- From: "ccoutant at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Nov 2010 02:17:36 +0000
- Subject: [Bug debug/46123] [4.5/4.6 Regression] ICE: in output_aranges, at dwarf2out.c:11531 with -feliminate-dwarf2-dups -g
- Auto-submitted: auto-generated
- References: <bug-46123-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46123
--- Comment #4 from ccoutant at google dot com 2010-11-19 02:17:27 UTC ---
> Ugh, this is very ugly. Âgen_subprogram_die sometimes decides to reuse old_die
> which was DW_AT_declaration and can be deeply nested in type children, which
> breaks -feliminate-dwarf2-dups as well as -gdwarf-4 if those are moved to
> separate CUs (either the comdat ones or .debug_types).
> The patch fixes this by not reusing the old die if doing one or another way of
> duplicate removals (perhaps could do an extra check if the old_die is actually
> in a tree that is going to be moved, which wouldn't be that hard to do for
> break_out_includes, but would be uglier for .debug_types). ÂOr we could do it
> always. ÂUnfortunately just doing that leads to crashes, because context_die is
> NULL and dwarf2out_finish doesn't want to see limbo DIEs with type contexts, so
> the patch also uses comp_unit_die () in that case.
When would context_die == NULL in a case where it would not be OK to
reuse the old_die? Wouldn't it be sufficient to force the new die only
if context_die != NULL?
-cary