From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA2583858423; Wed, 4 Aug 2021 06:51:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA2583858423 From: "tnfchris at gcc dot gnu.org" 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 06:51:53 +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: tnfchris 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: Wed, 04 Aug 2021 06:51:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101750 --- Comment #4 from Tamar Christina --- (In reply to rguenther@suse.de from comment #3) > On Tue, 3 Aug 2021, tnfchris at gcc dot gnu.org wrote: >=20 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101750 > >=20 > > --- Comment #2 from Tamar Christina --- > > (In reply to Richard Biener from comment #1) > > > On x86_64 the testcase is optimized to the following now: > > > not sure how we conclude that 'n' is not written to anywhere. The is= sue > > > persists even when I rename 'main' to 'foo' (when it's 'main' we coul= d indeed > > > conclude so). > >=20 > > I think it's because it's concluding that the access of `h` must trap s= ince `h` > > is local and uninitialized. >=20 > Hmm, but 'h' is a member of the class object 'n' which is global. >=20 yes but while 'n' is a global, 'h' inside 'n' is private and has no path to= be initialized. It's not initialized by 'j()' nor can you do it from the outs= ide with a reference to 'n'. Since 'h' is private it can only be accessed by me= thod members and none write to it. so no matter which context you call 'j()' from the operation must always fa= il. That's why renaming `main` to `foo` doesn't matter in this case. > > That also explains the abort. Looks like the reducer needs some slight > > adjustment. if I declare `h` static then it works again.=