https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107058
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|ipa |debug
CC| |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
#1 0x0000000001223942 in dwarf2out_die_ref_for_decl (decl=
<const_decl 0x7ffff669a000 A>, sym=0x7fffffffd170, off=0x7fffffffd168)
at /home/rguenther/src/trunk/gcc/dwarf2out.cc:6037
6037 gcc_assert (die->die_tag == DW_TAG_compile_unit
(gdb) l
6032 *off = die->die_offset;
6033 while (die->die_parent)
6034 die = die->die_parent;
6035 /* For the containing CU DIE we compute a die_symbol in
6036 compute_comp_unit_symbol. */
6037 gcc_assert (die->die_tag == DW_TAG_compile_unit
6038 && die->die_id.die_symbol != NULL);
6039 *sym = die->die_id.die_symbol;
6040 return true;
6041 }
(gdb) p die->die_tag
$1 = DW_TAG_type_unit
(gdb) p die->die_id.die_symbol
$2 = 0x0
I think -fdebug-types-section isn't handled by early LTO debug I also think
we have a duplicate about this.
It might also be time to get rid of -fdebug-tyes-section? Nobody uses it.
But I'm also not sure why the DIE for a CONST_DECL is inside a type unit?
(gdb) p debug_tree (expr)
<const_decl 0x7ffff669a000 A
type <enumeral_type 0x7ffff6685738 ._anon_0
type <integer_type 0x7ffff66857e0 unsigned int public unsigned SI
size <integer_cst 0x7ffff653d1c8 constant 32>
unit-size <integer_cst 0x7ffff653d1e0 constant 4>
align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff66857e0 precision:8 min <integer_cst 0x7ffff6693a68 0> max <integer_cst
0x7ffff6661ea0 255>>
asm_written unsigned type_6 SI size <integer_cst 0x7ffff653d1c8 32>
unit-size <integer_cst 0x7ffff653d1e0 4>
align:32 warn_if_not_align:0 symtab:-162242480 alias-set -1
canonical-type 0x7ffff6685738 precision:32 min <integer_cst 0x7ffff653d1f8 0>
max <integer_cst 0x7ffff653d1b0 4294967295> context <translation_unit_decl
0x7ffff6525168 pr50459.c>>
readonly constant used VOID pr50459.c:6:8
align:1 warn_if_not_align:0 context <translation_unit_decl 0x7ffff6525168
pr50459.c> initial <integer_cst 0x7ffff6693ab0 128> chain <type_decl
0x7ffff654abe0 ._anon_0>>