From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6590F3833DB6; Tue, 21 Feb 2023 12:26:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6590F3833DB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676982372; bh=zViWvV3yn99mTsZ9ggoHLWPeALm0bRmTb5HMPT8bEbE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hGfWrhWR4bpDifexTIwnfBUz0wQGGh+DQ4cL4d5pWnCVrHJRuq+TCREcX1lM8A5FL UCrFdQwGwI2uS3E2cRGksptx4x9LHAZ/G7BoFbc41gx/3MhM5e0ptCI88mcWZyD6bI Hxn9DlPgYUsRWR59E5wmjJ4/KSwi0OtIfAlqnVt8= 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: Tue, 21 Feb 2023 12:26:09 +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 #7 from Richard Biener --- (In reply to Richard Biener from comment #6) > (In reply to Richard Biener from comment #5) > > another possibility would be to stream "no DIE" info for not late > > created decls >=20 > like by setting DECL_IGNORED_P on them? Like maybe with the following > which also fixes the issue: >=20 > 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; > } > } Even using else if (DECL_P (expr) && ! DECL_ABSTRACT_ORIGIN (expr) && ! (TARGET_PECOFF || TARGET_COFF)) gets us quite some guality regressions. The original proposed change feels wrong though.=