https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043
--- Comment #12 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #11)
> (In reply to Richard Biener from comment #10)
>
> > Is there any case where the frontend would make 'data' point into the
> > middle of the array and iteration over the array would end up accessing
> > elements on "both sides"? Can somebody write a short testcase where that
> > would happen?
>
> I've tried, but I have been unable to find such a test case, and
> I do not think this can (or should) happen.
I would say it can happen as things stand, when one dimension is accessed going
backward and another going forward.
program main
implicit none
integer, dimension :: a(4, 4)
a = 0
call s(a(4:1:-1,:))
if (any(a /= 10)) stop 1
contains
subroutine s(b)
implicit none
integer, dimension(:,:) :: b
b = 10
end subroutine s
end program main