From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 436593858D32; Sun, 13 Aug 2023 18:20:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 436593858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691950808; bh=tA/OuGx4jaGLRc4/DNK0ApThEpM1xMPffJ3g5nMEIYc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VIQp+Slz1m3HNpXqP/R/ozIuUSAr/HDf1y2ASPjHKKJjf3RdyX1zxs22YBkoKChFX M6Va+yb+cLcUSWniUamRwFliH4RVWFL7pVZSa9HkZkM7d31cPuKg7tuHkG3mL/RTzt IfzgygWwcMfCiuylGAmLldi8R+8HIXUVt8V0NPnM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111000] [14 Regression] Wrong code at -O3 on x86_64-linux-gnu since r14-2944-g3d48c11ad08 Date: Sun, 13 Aug 2023 18:20:07 +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: 14.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: 14.0 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=3D111000 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-08-13 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed, changed to make it self contained testcase and maybe understand = what is going wrong: ``` int printf(const char *, ...); volatile int a =3D 68; int b, d, e; int main() { int t =3D a; for (; d <=3D 6; d++) { for (b =3D 0; b <=3D 6; b++) { if (t >=3D 31) e =3D d; else if (d > (647 >> t)) e =3D d; else e =3D 0; } } printf("%d\n", e); if (e !=3D 6) __builtin_abort(); } ```=