From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E1DAB3858C20; Mon, 25 Sep 2023 07:23:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1DAB3858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695626629; bh=bbYnr7RL4zlChubAgyfr779N336K2klKmEU3P8P5+7I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Maut+gasaHd56ZmufZIDeEgZGI6UiA15jD3gvoaZ6kKcUwgiur1LiBBBvWQbAFpfo Ezy/P5mWEQ9tR1nLnJbSJKIiT/L2JiOzKVWPvPOhxvv9D7Upccd5XSPLr1MpsdWP0X oMM66MCR/UQofkgDkfzBi03ETzvMTeZL2BV2YaI4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111522] Different code path for static initialization with flto Date: Mon, 25 Sep 2023 07:23:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D111522 --- Comment #5 from Andrew Pinski --- (In reply to Mathieu Malaterre from comment #4) > > So the original > > (upstream) code is somewhat buggy as it rely on lazy init for global va= r. >=20 > Those global vars are in different namespace, I actually fail to underwhat > why the definition with ",cpu=3Dpower10" gets pulled in... Because `#pragma GCC target targets_str` is global state and unrelated to namespace ...=