From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 273913858289; Sat, 8 Jul 2023 01:17:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 273913858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688779040; bh=i+8QJ3zLI8OArpZepDmFYnuAkDdIAMk8HuWSp4peyfg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QQK4Ra9Unc1NYVn6pZD1a8cW3+HxrnnSkPjCsxIBt05OcCbzge/nNScN0V4ATqXeB IdqXlT9MBbwpocT+EkehhYgh51mMGeMS6KpFSiEV582tp6w+huTd5QN601gqKMpXCW gV+Ngwwizn9y+b0GHDWP9ymplf5e7n1E6eZ0YcLs= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110582] [14 Regression] Wrong code at -O2/3 on x86_64-linux-gnu Date: Sat, 08 Jul 2023 01:17:20 +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: needs-bisection, 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: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110582 --- Comment #4 from Andrew Pinski --- Another testcase: ``` int a, b; int main() { char a =3D 0; int t =3D 0; for (; t <253; t ++){ int d =3D 2; d ^=3D 2 && a; b =3D a =3D=3D 0 ? d : d / a; a =3D b; } for (; (1 + 95 << 24) + b + 1 + 686658714L + b - 2297271457;) ; } ``` Just to show that you could count up from 0 to 253 and still have an issue without any wrapping happening in the original code.=