From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E51413858C50; Fri, 20 Oct 2023 12:04:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E51413858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697803476; bh=vAw9SbgY49o7w04d9i+D1YRZLjb0sizt6J2hXKfWh1c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p8eI29v86p7G3qfHKzgQERmyTZIwXmunBtAbmcrK16KCaIdO7WJXjuG7/Zl5TLs4D Y9Ne8bHTjSTDiywNI5hsr7Ck3xoKgeLesJOY7oSABDFAH68ig/C7KI2SD7H1R30lO0 FB9yAa1a3zv9Cnj4s2Xcnkzn0/BfE6BJ/CFaLhXI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111445] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-1077-g57bf3751511 Date: Fri, 20 Oct 2023 12:04:36 +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: rguenth 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: 12.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111445 --- Comment #3 from Richard Biener --- For the testsuite, not fixed by the fix for PR110243: /* { dg-do run } */ extern void abort (void); short a, b; unsigned char c =3D 255; unsigned cnt; void __attribute__((noipa)) check (int x) { if (x !=3D 0) abort (); cnt++; } int main()=20 {=20 int d; unsigned char e; d =3D 0;=20 for (; a >=3D 0; a--) { int *f =3D &d; *f =3D c; }=20 e =3D 0;=20 for (; (unsigned char)(d - 255) + e <=3D 1; e++) check (b); if (cnt !=3D 2) abort (); return 0; }=