gcc/testsuite/gfortran.dg/dependency_35.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-Warray-temporaries -O" } |
| 3 | module foo |
| 4 | implicit none |
| 5 | contains |
| 6 | pure function bar(i,j) |
| 7 | integer, intent(in) :: i,j |
| 8 | integer, dimension(2,2) :: bar |
| 9 | bar = 33 |
| 10 | end function bar |
| 11 | end module foo |
| 12 | |
| 13 | program main |
| 14 | use foo |
| 15 | implicit none |
| 16 | integer a(2,2), b(2,2),c(2,2), d(2,2), e(2) |
| 17 | |
| 18 | read (*,*) b, c, d |
| 19 | a = matmul(b,c) + d |
| 20 | a = b + bar(3,4) |
| 21 | a = bar(3,4)*5 + b |
| 22 | e = sum(b,1) + 3 |
| 23 | end program main |