This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/81936] ICE in dwarf2out_die_ref_for_decl, at dwarf2out.c:5543


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);
        }
...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]