* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / dependency_43.f90
blobc407369c5e6c74dbb27249f7171813ffbe5766b4
1 ! { dg-do run }
2 ! { dg-options "-Warray-temporaries" }
3 ! PR fortran/56937 - unnecessary temporaries with vector indices
4 program main
5 integer, dimension(3) :: i1, i2
6 real :: a(3,2)
8 data a / 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 /
9 i1 = [ 1, 2, 3 ]
10 i2 = [ 3, 2, 1 ]
11 a (i1,1) = a (i2,2)
12 if (a(1,1) /= 6.0 .or. a(2,1) /= 5.0 .or. a(3,1) /= 4.0) call abort
13 if (a(1,2) /= 4.0 .or. a(2,2) /= 5.0 .or. a(3,2) /= 6.0) call abort
14 end program main