From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 906783858413; Wed, 4 Aug 2021 07:37:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 906783858413 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101750] [12 regression] g++.dg/vect/pr99149.cc fails on aarch64 since r12-2523 Date: Wed, 04 Aug 2021 07:37:29 +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: rguenther at suse dot de 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: Wed, 04 Aug 2021 07:37:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101750 --- Comment #6 from rguenther at suse dot de --- On Wed, 4 Aug 2021, tnfchris at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101750 >=20 > --- Comment #5 from Tamar Christina --- > And yes the same semantics apply to 'i', but if I read it right the patch= in=20 > r12-2523 is tracking variables that are read but never written to. So 'i' > escaped the same issue because it's written to somewhere. I don't think we employ any of those C++ specific analyses, but I also=20 didn't try to track down what exactly happens. The following doesn't reproduce it: int f; struct X { int *q; int *r; } n; void foo (struct X *p) { p->r[f] =3D p->q[0] + p->r[f]; } void bar () { foo (&n); } Maybe 'n' becomes local because its type is local. Indeed, that seems to happen. So maybe just give the class a name.=