From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52F8F3858C74; Mon, 28 Mar 2022 06:36:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52F8F3858C74 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102043] [9/10/11/12 Regression] Wrong array types used for negative stride accesses, gfortran.dg/vector_subscript_1.f90 FAILs Date: Mon, 28 Mar 2022 06:36:44 +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: 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: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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: Mon, 28 Mar 2022 06:36:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102043 --- Comment #36 from rguenther at suse dot de --- On Sun, 27 Mar 2022, mikael at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102043 >=20 > --- Comment #35 from Mikael Morin --- > A little status update. >=20 > I have pushed the latest patch attached to this PR a little further, but = not > far enough to reduce the number of testsuite regressions to 0. >=20 > I plan to submit it for gcc-13, but it won=E2=80=99t make it for gcc-12. >=20 > (In reply to Richard Biener from comment #33) > > With > > a single dimension there's not much value in using ARRAY_REF over > > pointer arithmetic and dereference. >=20 > I have tried to fix this PR using pointer arithmetic too. > But there are so many places in the frontend where we expect to have an a= rray > type when dereferencing a descriptor pointer, that it=E2=80=99s not as si= mple as it > seems and I finally convinced myself that the patch attached to this PR w= as the > best way to go. OK. > For gcc-12, is there a way to add a middle-end workaround using annotatio= ns on > descriptor types (a lang flag or something) ? I will think of what options we have to work around this in the middle-end (maybe with help of the frontend during gimplification).=