summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/loop_versioning_1.f90
blob: e80f8920d00c72feeca0b36e8e97691a57c35852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
! { dg-options "-O3 -fdump-tree-lversion-details" }

! The simplest IV case.

subroutine f1(x)
  real :: x(:)
  x(:) = 100
end subroutine f1

subroutine f2(x, n, step)
  integer :: n, step
  real :: x(n * step)
  do i = 1, n
     x(i * step) = 100
  end do
end subroutine f2

subroutine f3(x, limit, step)
  integer :: limit, step
  real :: x(limit)
  do i = 1, limit, step
     x(i) = 100
  end do
end subroutine f3

! { dg-final { scan-tree-dump-times {likely to be the innermost dimension} 1 "lversion" } }
! { dg-final { scan-tree-dump-times {want to version containing loop} 3 "lversion" } }
! { dg-final { scan-tree-dump-times {versioned this loop} 3 "lversion" } }