tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray / get_to_indirect_array.f90
blobefb783536375d26774d66aadcd2084560715a013
1 ! { dg-do run }
3 ! Test that pr81773/fortran is fixed.
5 program get_to_indexed_array
7 integer, parameter :: ndim = 5
8 integer :: i
9 integer :: vec(1:ndim) = 0
10 integer :: indx(1:2) = [3, 2]
11 integer :: mat(1:ndim, 1:ndim) = 0
12 integer :: res(1:ndim)[*]=[ (i, i=1, ndim) ]
14 ! No sync needed, because this test always is running on single image
15 vec([ndim , 1]) = res(1:2)[1]
16 if (vec(1) /= res(2) .or. vec(ndim) /= res(1)) then
17 print *,"vec: ", vec, " on image: ", this_image()
18 stop 1
19 end if
21 mat(2:3,[indx(:)]) = reshape(res(1:4)[1], [2, 2])
22 if (any(mat(2:3, 3:2:-1) /= reshape(res(1:4), [2,2]))) then
23 print *, "mat: ", mat, " on image: ", this_image()
24 stop 2
25 end if
26 end
28 ! vim:ts=2:sts=2:sw=2: