https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103671

            Bug ID: 103671
           Summary: arrays with negative strides are wrongly passed as
                    argument.
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikael at gcc dot gnu.org
  Target Milestone: ---

This has been identified in PR102043 comment #13.
Testcase from there:

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

Reply via email to