PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / dependency_43.f90
blobe5d1887ea4c4116ae49417bb6e3f235b50451273
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) STOP 1
13 if (a(1,2) /= 4.0 .or. a(2,2) /= 5.0 .or. a(3,2) /= 6.0) STOP 2
14 end program main