From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 618713858C83; Thu, 29 Sep 2022 08:05:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 618713858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664438741; bh=MXfUj1NrfwvUZY6RTiUOj1Pw75i6mvl5BL9DByi/PpU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=B6vqTiAW3fY0OvD/smSidfzFG0gz1Ie6j5KuKdlMSpfZrhJ4O9TkPBI2J2ROAzfjk apJmbImsiLZh5qwv9B/fTNIDdsDyz4ige3S4DWZKKhq2H7eOPrOVoui78TCBLEZuaR 6gELT+u45mqPL/pVYu+Jg/Q6Q64eU+EmJeK84XLs= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/107058] [11/12/13 Regression] ICE in dwarf2out_die_ref_for_decl, at dwarf2out.cc:6038 since r11-5003-gd50310408f54e380 Date: Thu, 29 Sep 2022 08:05:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107058 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Component|ipa |debug CC| |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener --- #1 0x0000000001223942 in dwarf2out_die_ref_for_decl (decl=3D , sym=3D0x7fffffffd170, off=3D0x7fffffffd1= 68) at /home/rguenther/src/trunk/gcc/dwarf2out.cc:6037 6037 gcc_assert (die->die_tag =3D=3D DW_TAG_compile_unit (gdb) l 6032 *off =3D die->die_offset; 6033 while (die->die_parent) 6034 die =3D 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 =3D=3D DW_TAG_compile_unit 6038 && die->die_id.die_symbol !=3D NULL); 6039 *sym =3D die->die_id.die_symbol; 6040 return true; 6041 } (gdb) p die->die_tag $1 =3D DW_TAG_type_unit (gdb) p die->die_id.die_symbol $2 =3D 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) unit-size align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-ty= pe 0x7ffff66857e0 precision:8 min max > asm_written unsigned type_6 SI size unit-size align:32 warn_if_not_align:0 symtab:-162242480 alias-set -1 canonical-type 0x7ffff6685738 precision:32 min max context > readonly constant used VOID pr50459.c:6:8 align:1 warn_if_not_align:0 context initial chain >=