From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8D99B3838156; Fri, 9 Dec 2022 22:46:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D99B3838156 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670626011; bh=6pLwywKFOUVIT11SCpTkYROP8GDXz9/gwfyLG3A0rkc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vuxtrNkxdyv36JOVsZe8FLXllZJRxFMb9wiLwTpWKJ7ugRtU3CT8zpkNbpQfqt0A0 RKgsEEtwJvz19YjIFkdxB/KHjHbDk/xuTBENqg/3hh01Vid/a+58CDDHOUYLtbiPuX E2PEhe3S/o44/bhLsIQ5b6Mk6EnIPCSvViBXakNw= From: "tneumann at users dot sourceforge.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/107675] [13 Regression] GCC-13 is significantly slower to startup on C++ statically linked programs Date: Fri, 09 Dec 2022 22:46:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tneumann at users dot sourceforge.net 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: 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=3D107675 --- Comment #15 from Thomas Neumann = --- > You cannot use 'relaxed' atomic load in is_object_initialized - as thread > performing such load will not observe/synchronize with any modifications > (other than atomic variable itself) performed by other threads. you are right, this has to be acquire. Very unfortunate. I thought we would= get away with relaxed because we double-check anyway, but with relaxed we might miss the writes to the other fields of object. On systems with strong memory order it does not matter, but on ARM this will make the check slower.=