[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr48636-2.f90
blob30a7e75614aad00968051b426a500bf502ce1838
1 ! { dg-do compile }
2 ! { dg-options "-O3 -fdump-ipa-cp-details -fno-inline" }
4 module foo
5 implicit none
6 contains
7 subroutine bar(a,x)
8 real, dimension(:,:), intent(in) :: a
9 real, intent(out) :: x
10 integer :: i,j
12 x = 0
13 do j=1,ubound(a,2)
14 do i=1,ubound(a,1)
15 x = x + a(i,j)**2
16 end do
17 end do
18 end subroutine bar
19 end module foo
21 program main
22 use foo
23 implicit none
24 real, dimension(2,3) :: a
25 real :: x
26 integer :: i
28 data a /1.0, 2.0, 3.0, -1.0, -2.0, -3.0/
30 do i=1,2000000
31 call bar(a,x)
32 end do
33 print *,x
34 end program main
36 ! { dg-final { scan-ipa-dump "Creating a specialized node of \[^\n\r\]*bar/\[0-9\]*\\." "cp" } }
37 ! { dg-final { scan-ipa-dump-times "Aggregate replacements\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=" 2 "cp" } }