1! { dg-do compile } 2! { dg-options "-frepack-arrays -Warray-temporaries -O" } 3 4! Same as dependency_35 but with repack-arrays 5 6module foo 7 implicit none 8contains 9 pure function bar(i,j) ! { dg-warning "Creating array temporary at \\(1\\)" } 10 integer, intent(in) :: i,j 11 integer, dimension(2,2) :: bar 12 bar = 33 13 end function bar 14end module foo 15 16program main 17 use foo 18 implicit none 19 integer a(2,2), b(2,2),c(2,2), d(2,2), e(2) 20 21 read (*,*) b, c, d 22 a = matmul(b,c) + d 23 a = b + bar(3,4) 24 a = bar(3,4)*5 + b 25 e = sum(b,1) + 3 26end program main 27