gcc/testsuite/gfortran.dg/dependency_34.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-Warray-temporaries" } |
| 3 | module foo |
| 4 | implicit none |
| 5 | contains |
| 6 | integer pure function bar(i,j) |
| 7 | integer, intent(in) :: i,j |
| 8 | bar = 3 - i + 1 * abs(i) + j |
| 9 | end function bar |
| 10 | end module foo |
| 11 | |
| 12 | program main |
| 13 | use foo |
| 14 | implicit none |
| 15 | real a(10) |
| 16 | integer :: i |
| 17 | read (*,*) a, i |
| 18 | a(i:abs(i)) = a(i:abs(i)) |
| 19 | a(bar(i,i+2):2) = a(bar(i,i+2):2) |
| 20 | a(int(i,kind=2):5) = a(int(i,kind=2)+1:6) |
| 21 | end program main |