1! { dg-options "-O3 -fdump-tree-lversion-details" } 2 3! Check that versioning can handle small groups of accesses, with the 4! group being a separate array dimension. 5 6subroutine f1(x, n, step) 7 integer :: n, step 8 real :: x(2, n * step) 9 do i = 1, n 10 x(1, i * step) = 100 11 x(2, i * step) = 101 12 end do 13end subroutine f1 14 15subroutine f2(x, limit, step) 16 integer :: limit, step 17 real :: x(2, limit) 18 do i = 1, limit, step 19 x(1, i) = 100 20 x(2, i) = 101 21 end do 22end subroutine f2 23 24subroutine f3(x, n, step) 25 integer :: n, step 26 real :: x(3, n * step) 27 do i = 1, n 28 x(1, i * step) = 100 29 x(2, i * step) = 101 30 x(3, i * step) = 102 31 end do 32end subroutine f3 33 34subroutine f4(x, limit, step) 35 integer :: limit, step 36 real :: x(3, limit) 37 do i = 1, limit, step 38 x(1, i) = 100 39 x(2, i) = 101 40 x(3, i) = 102 41 end do 42end subroutine f4 43 44subroutine f5(x, n, step) 45 integer :: n, step 46 real :: x(4, n * step) 47 do i = 1, n 48 x(1, i * step) = 100 49 x(2, i * step) = 101 50 x(3, i * step) = 102 51 x(4, i * step) = 103 52 end do 53end subroutine f5 54 55subroutine f6(x, limit, step) 56 integer :: limit, step 57 real :: x(4, limit) 58 do i = 1, limit, step 59 x(1, i) = 100 60 x(2, i) = 101 61 x(3, i) = 102 62 x(4, i) = 103 63 end do 64end subroutine f6 65 66! { dg-final { scan-tree-dump-times {want to version containing loop} 6 "lversion" } } 67! { dg-final { scan-tree-dump-times {versioned this loop} 6 "lversion" } } 68