subroutine foo (d, e, f, g, m, n) integer :: i, j, b(2:9), c(3:n), d(:), e(2:n), f(2:,3:), n integer, allocatable :: g(:), h(:), k, m logical :: l l = .false. allocate (h(2:7)) i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15 !$omp simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5)linear(g:6) & !$omp & linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l) do i = 0, 63 l = l .or. any (b /= 7 + i) l = l .or. any (c /= 8 + 2 * i) b = b + 1; c = c + 2 d = d + 3; e = e + 4; f = f + 5; g = g + 6 h = h + 7; k = k + 8; m = m + 9 end do if (l .or. i /= 64) call abort if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) call abort end subroutine interface subroutine foo (d, e, f, g, m, n) integer :: d(:), e(2:n), f(2:,3:), n integer, allocatable :: g(:), m end subroutine end interface integer, parameter :: n = 8 integer :: d(2:18), e(3:n+1), f(5:6,7:9) integer, allocatable :: g(:), m allocate (g(7:10)) call foo (d, e, f, g, m, n) end