RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_temporaries_1.f90
blob64fc59046f48a5a2db4c1bf527b004949153891d
1 ! { dg-do compile }
2 ! { dg-options "-Warray-temporaries" }
4 subroutine bar(a)
5 real, dimension(2) :: a
6 end
8 program main
9 integer, parameter :: n=3
10 integer :: i
11 real, dimension(n) :: a, b
13 a = 0.2
14 i = 2
15 a(i:i+1) = a(1:2) ! { dg-warning "Creating array temporary" }
16 a = cshift(a,1) ! { dg-warning "Creating array temporary" }
17 b = cshift(a,1)
18 call bar(a(1:3:2)) ! { dg-warning "Creating array temporary" }
19 end program main