From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 522E1384F01D; Sun, 6 Jun 2021 20:57:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 522E1384F01D From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100923] wrong code at -O2 and above on x86_64-linux-gnu Date: Sun, 06 Jun 2021 20:57:59 +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: unknown X-Bugzilla-Keywords: alias, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: short_desc everconfirmed cf_reconfirmed_on bug_status keywords 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: Sun, 06 Jun 2021 20:57:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100923 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|wrong code at -Os and above |wrong code at -O2 and above |on x86_64-linux-gnu |on x86_64-linux-gnu Ever confirmed|0 |1 Last reconfirmed| |2021-06-06 Status|UNCONFIRMED |NEW Keywords| |alias, wrong-code --- Comment #2 from Andrew Pinski --- - working (-O2 -fno-strict-aliasing) + not working (-O2 -fstrict-aliasing) - l.1_3 =3D l; - e.2_5 =3D e; - f.3_6 =3D f; - *e.2_5 =3D f.3_6; - _7 =3D *l.1_3; - if (_7 !=3D 0) + l.1_4 =3D l; + _5 =3D *l.1_4; + e.2_6 =3D e; + f.3_7 =3D f; + *e.2_6 =3D f.3_7; + if (_5 !=3D 0) So we swapped around the store to *e and the load from *l.=