From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C9993858D20; Fri, 4 Feb 2022 12:36:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C9993858D20 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104381] New: [12 Regression] -gtoggle no longer applied when using optimize attribute Date: Fri, 04 Feb 2022 12:36:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Fri, 04 Feb 2022 12:36:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104381 Bug ID: 104381 Summary: [12 Regression] -gtoggle no longer applied when using optimize attribute Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- int foo (int x) { int tem =3D x + 1; int tem2 =3D tem - 1; return tem2; } int __attribute__((optimize("no-tree-pre"))) bar (int x) { int tem =3D x + 1; int tem2 =3D tem - 1; return tem2; } with > ./xgcc -B. t.c -O2 -g -gtoggle -fdump-tree-optimized -c I get ;; Function foo (foo, funcdef_no=3D0, decl_uid=3D1979, cgraph_uid=3D1, symbol_order=3D0) int foo (int x) { [local count: 1073741824]: return x_1(D); } ;; Function bar (bar, funcdef_no=3D1, decl_uid=3D1984, cgraph_uid=3D2, symbol_order=3D1) __attribute__((optimize ("no-tree-pre"))) int bar (int x) { [local count: 1073741824]: # DEBUG tem =3D> x_1(D) + 1 # DEBUG tem2 =3D> x_1(D) return x_1(D); } so -gtoggle is not applied to 'bar'. This works fine with GCC 11.=