https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043
--- Comment #16 from Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> --- In addition to comment #1 here's an excerpt of an existing test with just one dimension: $ cat f_pr86389.f90 ! PR 19239. Check for various kinds of vector subscript. In this test, ! all vector subscripts are indexing single-dimensional arrays. ! { dg-do run } program main implicit none integer, parameter :: n = 10 integer :: i integer, dimension (n) :: a, b, idx, id idx = (/ 3, 1, 5, 2, 4, 10, 8, 7, 6, 9 /) id = (/ (i, i = 1, n) /) b = (/ (i * 100, i = 1, n) /) a = 0 a (idx (10:6:-2)) = b (idx (1:7:3)) write(*,*) "#i =", id write(*,*) "idx =", idx write(*,*) "now a=", a write(*,*) "now b=", b write(*,*) "a idx(10:6:-2)=", idx (10:6:-2) write(*,*) "b idx(1:7:3) =", idx (1:7:3) call test (idx (10:6:-2), idx (1:7:3)) contains subroutine test (lhs, rhs) integer, dimension (:) :: lhs, rhs integer :: i !!! if (size (lhs, 1) .ne. size (rhs, 1)) STOP 11 ! do i = 1, size (lhs, 1) do i = 1, 3 ! spare us the code for size(), fixed const if (a (lhs (i)) .ne. b (rhs (i))) STOP 12 end do ! a = 0 end subroutine test end program main