This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/81936] ICE in dwarf2out_die_ref_for_decl, at dwarf2out.c:5543
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Aug 2017 16:52:40 +0000
- Subject: [Bug debug/81936] ICE in dwarf2out_die_ref_for_decl, at dwarf2out.c:5543
- Auto-submitted: auto-generated
- References: <bug-81936-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81936
--- Comment #13 from Tom de Vries <vries at gcc dot gnu.org> ---
I've tried to see if I could workaround the problem by disabling the assert:
...
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0c339bd46f0..b2df3b89c2e 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -5538,9 +5538,12 @@ dwarf2out_die_ref_for_decl (tree decl, const char **sym,
while (die->die_parent)
die = die->die_parent;
/* For the containing CU DIE we compute a die_symbol in
- compute_comp_unit_symbol. */
+ compute_comp_unit_symbol.
+ TODO: Remove flag_generate_offload from assert condition, and fix
+ fallout (PR81936).
+ */
gcc_assert (die->die_tag == DW_TAG_compile_unit
- && die->die_id.die_symbol != NULL);
+ && (die->die_id.die_symbol != NULL || flag_generate_offload));
*sym = die->die_id.die_symbol;
return true;
}
...
That worked for pr66714.c, but for all other ICE-ing test-cases I run into
another ICE, now in mkoffload:
...
else
{
/* Pickle stray references. */
t = lto_input_tree_1 (&ib_main, data_in, tag, 0);
gcc_assert (t && data_in->reader_cache->nodes.length () == from);
}
...