From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0BC6A3858400; Tue, 28 Sep 2021 08:54:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BC6A3858400 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102510] Function call has unnecessary stride check Date: Tue, 28 Sep 2021 08:54:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: cf_reconfirmed_on everconfirmed bug_status cf_known_to_fail keywords 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: Tue, 28 Sep 2021 08:54:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102510 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-09-28 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Known to fail| |12.0 Keywords| |missed-optimization Summary|Function call has |Function call has |unnecessary aliasing check |unnecessary stride check --- Comment #1 from Richard Biener --- It's not an alias but we seem to not know that the array stride of the resu= lt is one and thus we version on that. I'm not sure whether fortran allows res(/1, 16, 2/) =3D add2vecs2(a, b) or so or why we know the inputs are not strided. The result comes in as array descriptor while the other arguments are pointers to a flat [8] array. Adding 'contiguous' yields Error: 'add2vecs2' at (1) has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape or assumed-rank array so maybe it's really just a missed optimization in the Frontend?=