From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 30F8C3858C2D; Fri, 9 Sep 2022 07:53:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30F8C3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662709999; bh=EmGT7UGRDijccjLJrJaFWZGUmddSyU/K8BS84OoQSdc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fXPeaKLPEyn8w72bNxCurcikqSQeLg+DH8lI6l4Qtecsfx3iXFCPwDdQKpUKHDHP2 s9lhMVDiFE6NE03sBE3WzbgQ1mJbVstT0lbWIHT68bBIwKtlnYRDhk/fAvrJ0/klfS RxXn7UG7OAnQsaxQitlWabMAewCXvJgJ7bKnKdww= From: "shaohua.li at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu Date: Fri, 09 Sep 2022 07:53:19 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: shaohua.li at inf dot ethz.ch X-Bugzilla-Status: WAITING 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 #3 from Li Shaohua --- Yes, I reduced it too much. Here is the new one with return value in g() function. a, b, c, d, e; f[8]; g() { while (a) a >>=3D 4; return 0; } h(i) { if (i >=3D '0') return i - '0'; } j(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; } } main() { j(1); printf("%d\n", f[2]); }=