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 08:28:33 +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 #3 from Tom de Vries <vries at gcc dot gnu.org> ---
ICE is due to assert:
...
at gcc/dwarf2out.c:5542
5542 gcc_assert (die->die_tag == DW_TAG_compile_unit
5543 && die->die_id.die_symbol != NULL);
...
The assert triggers because die->die_id.die_symbol is NULL:
...
(gdb) p die->die_tag
$3 = DW_TAG_compile_unit
(gdb) p die->die_id.die_symbol
$4 = 0x0
...
If we go up we see we're trying to find a die_ref for 'expr':
...
(gdb) up
#7 0x0000000000b9d804 in lto_write_tree_1 (ob=0x2771d30, expr=0x7ffff7521180,
ref_p=Unhandled dwarf expression opcode 0xf3)
at gcc/lto-streamer-out.c:422
422 && debug_hooks->die_ref_for_decl (expr, &sym, &off))
...
and expr is:
...
(gdb) call debug_generic_expr (expr)
.omp_data_i
...