From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CBBBA3858C54; Mon, 11 Apr 2022 17:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBBBA3858C54 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105227] [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 Date: Mon, 11 Apr 2022 17:39:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on priority 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2022 17:39:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105227 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-04-11 Priority|P3 |P1 Component|c++ |tree-optimization CC| |jason at gcc dot gnu.org --- Comment #1 from Jason Merrill --- Confirmed. The problem seems to be that free_lang_data_in_decl changes DECL_CONTEXT of Klass::implementation to be the global scope because it isn't virtual, but eventually update_vtable_references changes the vtable entry for Klass::mag= ic to refer to (a local alias for) Klass::implementation, so maybe_record_node= 's attempts to ask about its class context fail. Currently free_lang_data_in_decl works around this issue for destructors specifically, but not for other member functions. Not sure if the component should be tree-optimization or lto, but it isn't a front-end issue.=