[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / dependency_41.f90
blobdb9e0e6288eb5764bdf0a6a93f43a3520daa73f3
1 ! { dg-do run }
2 ! { dg-options "-Warray-temporaries" }
3 ! No temporary should be generated in this case.
4 program main
5 implicit none
6 integer :: i,n
7 integer :: a(10)
8 integer :: b(10)
9 do i=1,10
10 a(i) = i
11 b(i) = i
12 end do
13 n = 1
14 ! Same result when assigning to a or b
15 b(n+1:10:4) = a(n+2:8:2)
16 a(n+1:10:4) = a(n+2:8:2)
17 if (any (a/=b)) call abort
18 end program main