From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6D883858426; Mon, 3 Jan 2022 10:26:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6D883858426 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/92860] [9/10/11/12 regression] Global flags affected by -O settings are clobbered by optimize attribute Date: Mon, 03 Jan 2022 10:26:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: deferred, opt-attribute X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 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: Mon, 03 Jan 2022 10:26:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D92860 --- Comment #76 from rguenther at suse dot de --- On Tue, 14 Dec 2021, marxin at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D92860 >=20 > --- Comment #75 from Martin Li=C5=A1ka --- > (In reply to David Binderman from comment #74) > > (In reply to Martin Li=C5=A1ka from comment #72) > > > You will manage, it's not rocket science. > > >=20 > > > So please, add break point at the place it triggers the ICE and do: > > >=20 > > > (gdb) p &ptr1->x_help_flag > > > (gdb) p &ptr2->x_help_flag > >=20 > > For this to work, I had to replace the options-save.o with a version > > compiled by -O0 and that made the problem go away ;-< >=20 > Or you would have to print &ptr1->x_help_flag with a printf and then > use gdb for the memory. >=20 > >=20 > > I am still happy to walk away from this bug report. It is known > > to occur on only one variant of one architecture and it is hard > > to reproduce. I can think of better things to work on in gcc. >=20 > Ok... >=20 > >=20 > > As far as finding a machine with a bdver2 architecture, I suspect > > any more recent AMD machine would be fine.=20 > >=20 > > Has no one checked the compile farm ? >=20 > No, there's not a bdver2 machine. Maybe the issue reproduces with only -mtune=3Dbdver2 or with -march=3Dbdver= 2=20 -mno-xop (XOP is what's removed from znver2 for example, not 100% sure that's all, but ...). It does sound like eventually options-save.c is miscompiled somehow ...=