From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DC9393858286; Mon, 20 Jun 2022 08:09:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC9393858286 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/106032] [10/11/12/13 Regression] wrong code at -Os and above on x86_64-linux-gnu Date: Mon, 20 Jun 2022 08:09:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: 10.4 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, 20 Jun 2022 08:09:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106032 --- Comment #6 from Andrew Pinski --- (In reply to Martin Li=C5=A1ka from comment #5) > (In reply to Andrew Pinski from comment #4) > > Here is a testcase which shows this was latent but fails in GCC 7+ (so = it is > > still a regression): > > int a, b, c, *d; > > int main() { > > int e =3D 0, f =3D 0; > > int *dd =3D d; > > for (; f < 1; f++) > > if (c < 0) > > e =3D *dd; > > if (a) { > > a =3D b ? 0 : a; > > e && (b =3D a); > > } > > return 0; > > } >=20 > This one started with r9-6299-gd7a700e0a701e516. I guess I need to make another testcase since that would have just changed = the gimple level.=