From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F8D03858423; Fri, 4 Nov 2022 12:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F8D03858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667565819; bh=mrx8n6n+LDxkud9ddx9YSr/sgImoymI7D8ssaI46MkY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GkMfxjKd4F2DbSaHGC5G3KgFbmU/BMiyRcJA2LXEz/Tt3SKpQVta2aGYCx2JnIAhk Ov7YO956Rg7yoAl0xPOKSe+f+D/t5wF5NP8x9ttwuQNbwO8IdYTK3b66iJIwiKtU4S oCfgsH7kgLQYsOiWpuJKi2RfE0MP+E/dNmsx+44M= From: "rdiezmail-gcc at yahoo dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc Date: Fri, 04 Nov 2022 12:43:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rdiezmail-gcc at yahoo dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi 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=3D107500 --- Comment #20 from R. Diez --- I had to modify the patch slightly. I guess that union member "unsigned char unused;" was removed after GCC 12.2 was released. But otherwise, the patch does work, at least in my bare-metal scenario. The atexit entry is no longer being generated, and I haven't seen any other side-effects yet.=