From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 985433857C79; Thu, 2 Dec 2021 09:14:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 985433857C79 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103300] [12 Regression] wrong code at -O3 on x86_64-linux-gnu since r12-4526-gd8edfadfc7a9795b Date: Thu, 02 Dec 2021 09:14:02 +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: 12.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: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2021 09:14:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103300 --- Comment #7 from Martin Li=C5=A1ka --- (In reply to Zhendong Su from comment #6) > Another test likely for the same issue: >=20 > [652] % gcctk -O3 small.c; ./a.out > Aborted > [653] % gcctk -O2 -floop-unroll-and-jam small.c; ./a.out > Aborted > [654] % cat small.c > int printf(const char *, ...); > int a[2], b, c, d, e; > int main() { > if (b) { > printf("0"); > goto L2; > } > L1: > b =3D 0; > L2: > if (d) > L3: > goto L1; > if (e) > goto L3; > if (c) > goto L2; > for (b =3D 0; b < 3; b++) > for (d =3D 0; d < 2; d++) > a[d] ^=3D 1; > if (a[1] !=3D 1) > __builtin_abort(); > return 0; > } Yes, started with the same revision.=