From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A9A9D3851A89; Thu, 20 Oct 2022 09:09:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9A9D3851A89 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666256978; bh=sk5XmfZeyEPGme3ACer0ARz0QNTG38jA4zm1uGtwkBg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RvYll62EZ3zE4UTHCnprMBxeCwsB+LKCzTP44afrTiE0v6P5tHkNfSNFa8qxXuJSb HznXQ6VnoFnxLLrn9k5RS/eL3ERfva14Sea21KUkTdDRlYi+/yCT+9N/IK7jdL59jR AVX4OISa/G6SHKatJ8QyyGMfVotgH+kfWRD9vv2s= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107323] [10/11/12 Regression] Loop distribute issue Date: Thu, 20 Oct 2022 09:09:37 +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: 11.2.0 X-Bugzilla-Keywords: needs-bisection, 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: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D107323 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marxin at gcc dot gnu.org --- Comment #2 from Martin Li=C5=A1ka --- Simpler C test-case: $ cat pr107323.c int A[4]; int B[4]; static const char *__attribute__((noipa)) foo() { return "1"; } int main() { const char *s =3D foo(); A[0] =3D 1000; for(int i =3D 1; i < 4; ++i) { B[i] =3D 0; A[i] =3D 0; if(s[0]) B[i] =3D 1; A[i] =3D A[i - 1]; } __builtin_printf ("A[3] =3D %d\n", A[3]); if (A[3] !=3D 1000) __builtin_abort (); }=