From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD5223858C74; Mon, 28 Mar 2022 12:24:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD5223858C74 From: "burnus at gcc dot gnu.org" 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 12:24:24 +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: burnus 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: 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 12:24:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102043 --- Comment #38 from Tobias Burnus --- (In reply to Thomas Koenig from comment #15) > One possibility would be to extend the patch Sandra posted at > https://gcc.gnu.org/pipermail/fortran/2021-January/055563.html > to scalarization. As mentioned by Thomas, a re-based patch is https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584716.html (I did not quickly see whether Mikael's patch c, attachment 51974) is completely orthogonal, goes in the same direction or a different one.) Mikael Morin wrote in (comment #35) > 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 > array type when dereferencing a descriptor pointer Do you see a special issue here or not? In that area, I realized when working on my OpenMP deep-mapping patch that there were issues related to coarrays and CLASS, in particular: * 'select type' always adds 'attr.pointer' which both permits wrong code (e= .g. deallocate, pointer assignment), but also sets the GFC_ARRAY_POINTER - but fixing it then caused issues with coarrays. (GFC_TYPE_ARRAY_AKIND also does not distinguish allocatable/pointer for ass= umed rank, but that should be only/mostly a problem for my OpenMP patch.) I have a continuously growing to-do list, but still: is there something I c= an do here?=