aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/predict-2.f90
blob: 93e3ad65c7470c8e6dff790c0c49df95626f483a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! { dg-options "-O2 -fdump-tree-profile_estimate" }

subroutine test(block, array)
integer :: i,j, block(9), array(4)

do i = array(1), array(2), 2
    do j = array(3), array(4), 3
       block(i) = j
    end do
end do
end subroutine test

! { dg-final { scan-tree-dump-times "Fortran loop preheader heuristics of edge" 2 "profile_estimate" } }
! { dg-final { scan-tree-dump-times "loop guard" 0 "profile_estimate" } }