From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F7D0385B51F; Mon, 20 Feb 2023 13:37:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F7D0385B51F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676900262; bh=07F8x8FM6xRVFfa8kBoljQDLJN/4HOcvEumSX0jbn/g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WYHXAFAvQRNG1zwPoO2S4UOOWFxdd4HET9kBg2Bk6VhxTVN1Y/Y3lbvA03olZPqY+ 8ZLPgfmjxetmbNEcqScgFkn3Fu2rfsY0+xrM1iun5ssrsJ2CBfEcoR0gcRqkzFME5c Pid4GdF8jud9HFzQZe+bJhbGWJw4Bg+fGkLfguVo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/108772] [13 Regression] ICE in force_decl_die, at dwarf2out.cc:26751 since r13-4161-g32d16fe9d7e347bc Date: Mon, 20 Feb 2023 13:37:40 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D108772 --- Comment #6 from Richard Biener --- (In reply to Richard Biener from comment #5) > another possibility would be to stream "no DIE" info for not late > created decls like by setting DECL_IGNORED_P on them? Like maybe with the following which also fixes the issue: diff --git a/gcc/lto-streamer-in.cc b/gcc/lto-streamer-in.cc index 03cb41cfa16..f91e51b9327 100644 --- a/gcc/lto-streamer-in.cc +++ b/gcc/lto-streamer-in.cc @@ -1739,6 +1739,10 @@ lto_read_tree_1 (class lto_input_block *ib, class data_in *data_in, tree expr) dref_entry e =3D { expr, str, off }; dref_queue.safe_push (e); } + else if (DECL_P (expr)) + /* Avoid creating a full DIE late for a decl that didn't have + it created early. */ + DECL_IGNORED_P (expr) =3D 1; } }=