From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F2E1C3858D37; Sat, 30 Mar 2024 18:48:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2E1C3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711824499; bh=Z3NeYfFCBsAwdzskbdVpqNYC6+LLr/XLmowRZ3J4UH8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eiQhBV9ONpdikXA2zSZh8UUn1K3zkUz/4waKBfB4kDmp5e7Ri+N+Zd1RD1dhKgXaJ fMiNCOdQQa01EUPegRjHmqg5uuEFjjs5x3/++gP9/KDLeACsVmYt6pG25S4+DcaN9i xhi5e9RtJFTv4wpU06JnECJkofyuwyy0bJlPSRng= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114532] gcc -fno-common option causes performance degradation on certain architectures Date: Sat, 30 Mar 2024 18:48:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: missed-optimization 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: cf_reconfirmed_on bug_status everconfirmed 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=3D114532 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-03-30 Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- ``` Rec_Pointer Ptr_Glob, Next_Ptr_Glob; int Int_Glob; Boolean Bool_Glob; char Ch_1_Glob, Ch_2_Glob; int Arr_1_Glob [50]; int Arr_2_Glob [50] [50]; ``` Maybe the order of these changed in the layout of the final executable. In the case of -fcommon, the layout of these are handled by the linker while with -fno-common, they are handled by compiler into the assembly into the specific section (and then the sections are combined/laid out by the linker= ). So maybe look at the linker map and compare it to what GCC does with -fno-common in the .s file.=