From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF49338708DD; Tue, 16 Feb 2021 11:40:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF49338708DD From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99117] [9/10/11 Regression] cannot accumulate std::valarray Date: Tue, 16 Feb 2021 11:40:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: needs-reduction, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de 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: 9.4 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: Tue, 16 Feb 2021 11:40:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99117 --- Comment #6 from rguenther at suse dot de --- On Tue, 16 Feb 2021, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99117 >=20 > Jakub Jelinek changed: >=20 > What |Removed |Added > -------------------------------------------------------------------------= --- > Known to work|7.5.0, 8.4.0 | > CC| |jakub at gcc dot gnu.org >=20 > --- Comment #5 from Jakub Jelinek --- > int* p =3D sum._M_data; > int* e1 =3D sum._M_data; >=20 > If p and e1 aren't __restrict__ too, shouldn't that be fine? Reading the= same But I think it's two different 'sum' in this case. The actual flow is quite hard to follow since as usual expression templates rely on a lot of inlining and most restrict qualifiers only take effect when on function parameters (there I see 'this' being restrict qualified quite often). > value multiple times shouldn't create new clique each time it is read. It doesn't. It uses points-to sets to assign cliques so unless the PTA solution is wrong the clique assignment shouldn't. > Though, isn't it before optimization a different argument instead? > I'd think even that should be ok, because using __restrict__ from FIELD_D= ECLs > is only ok if we can prove it is different structs (say pointers to them = also > being restrict), but the current aliasing code probably doesn't do that. See above.=