From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 911723858424; Fri, 9 Sep 2022 08:20:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 911723858424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662711605; bh=pGKHpslDBtb2eOacYF1HVrEjEXP+1g3uURcAXKh+/n4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=h80zaMwA4WpqVHJm0XF8pUbEsHLyWz6cve8v/+R6sgVr5EO6nuHNTE5e/90C/CGMZ dGmf948YPXCgPeBAWhtH650Iz8womej/C+Noav1z9srHzZsxMpdjwtrqRxCOeUDvwf GS9ghxgIwrpuVFZAnd73QjejtJGM3TO6uN4LwUC0= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu Date: Fri, 09 Sep 2022 08:20:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin 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: --- 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=3D106892 --- Comment #5 from Martin Li=C5=A1ka --- Clean up test-case: $ cat pr106892.c int a, b, c, d, e; int f[8]; int g() { while (a) a >>=3D 4; return 0; } int h(int i) { if (i >=3D '0') return i - '0'; } void j(int i) { b =3D 2; for (; g() <=3D 7; b++) if (i) { for (; e <=3D 7; e++) { c =3D 1; for (; c <=3D 7; c++) { d =3D h(b + 48); f[-d + 4] ^=3D 3; } } return; } } int main() { j(1); __builtin_printf("%d\n", f[2]); if (f[2] !=3D 0) __builtin_abort (); return 0; } Started to print '3' since r11-963-g80d6f89e78fc3b77.=