From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE5363854830; Mon, 14 Jun 2021 18:04:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE5363854830 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101062] [10/11/12 Regression] wrong code with "-O2 -fno-toplevel-reorder -frename-registers" Date: Mon, 14 Jun 2021 18:04:08 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority bug_status everconfirmed target_milestone cc cf_reconfirmed_on short_desc 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: Mon, 14 Jun 2021 18:04:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101062 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Target Milestone|--- |10.4 CC| |jakub at gcc dot gnu.org Last reconfirmed| |2021-06-14 Summary|wrong code with "-O2 |[10/11/12 Regression] wrong |-fno-toplevel-reorder |code with "-O2 |-frename-registers" |-fno-toplevel-reorder | |-frename-registers" --- Comment #1 from Jakub Jelinek --- Started with r10-3542-g0b92cf305dcf34387a8e2564e55ca8948df3b47a so likely latent before. Slightly adjusted testcase: /* { dg-do run } */ /* { dg-options "-O2 -fno-toplevel-reorder -frename-registers" } */ union U { signed b : 5; }; int c; volatile union U d[7] =3D {{8}}; short e =3D 1; __attribute__((noipa)) void foo () { for (c =3D 5; c; c--) e =3D d[6].b =3D 0; } int main () { foo (); if (e !=3D 0) __builtin_abort (); return 0; }=