From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9672385800E; Wed, 3 Nov 2021 16:04:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9672385800E From: "stefansf at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103063] New: Wrong code while using -O3 Date: Wed, 03 Nov 2021 16:04:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stefansf at linux dot ibm.com 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: Wed, 03 Nov 2021 16:04:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103063 Bug ID: 103063 Summary: Wrong code while using -O3 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: stefansf at linux dot ibm.com Target Milestone: --- int a =3D 0; unsigned char b =3D 0; int main() { a - 6; for (; a >=3D -13; a =3D a - 8) while((unsigned char)(b-- * 6)) ; if (b !=3D 127) __builtin_abort(); return 0; } Running the example while compiled with -O{0,1,2} works fine whereas it fai= ls with -O{3,fast} using gcc-12-4860-g73658e70d9e. Couldn't find a good commit= so far. Fails on IBM Z as well as x64. Still not sure where it fails. ifcvt looks good to me.=