* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr48636.f90
blobcb5b4d7a553ad7ba3bcc9dcc26b0cabfa33072ee
1 ! { dg-do compile }
2 ! { dg-options "-O3 -fdump-ipa-inline-details -fdump-ipa-fnsummary-details -fno-ipa-cp" }
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 "bar\[^\\n\]*inline copy in MAIN" "inline" } }
37 ! { dg-final { scan-ipa-dump-times "phi predicate:" 3 "fnsummary" } }
38 ! { dg-final { scan-ipa-dump "IPA hints: loop_iterations" "inline" } }