| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fdump-tree-gimple" } |
| 3 |
! |
| 4 |
! PR fortran/106566 |
| 5 |
! |
| 6 |
! { dg-final { scan-tree-dump-times "__attribute__\\(\\(omp declare simd \\(linear\\(0:ref,step\\(4\\)\\) simdlen\\(8\\)\\)\\)\\)" 2 "gimple" } } |
| 7 |
! { dg-final { scan-tree-dump-times "__attribute__\\(\\(omp declare simd \\(linear\\(0:ref,step\\(8\\)\\) simdlen\\(8\\)\\)\\)\\)" 2 "gimple" } } |
| 8 |
|
| 9 |
subroutine add_one2(p) |
| 10 |
implicit none |
| 11 |
!$omp declare simd(add_one2) linear(p: ref) simdlen(8) |
| 12 |
integer(kind=4) :: p |
| 13 |
|
| 14 |
p = p + 1 |
| 15 |
end subroutine |
| 16 |
|
| 17 |
subroutine linear_add_one2(p) |
| 18 |
implicit none |
| 19 |
!$omp declare simd(linear_add_one2) linear(p: ref, step(2)) simdlen(8) |
| 20 |
integer(kind=4) :: p |
| 21 |
|
| 22 |
p = p + 1 |
| 23 |
end subroutine |
| 24 |
|
| 25 |
module m |
| 26 |
integer, parameter :: NN = 1023 |
| 27 |
integer(kind=4) :: a(NN) |
| 28 |
contains |
| 29 |
subroutine module_add_one2(q) |
| 30 |
implicit none |
| 31 |
!$omp declare simd(module_add_one2) linear(q: ref) simdlen(8) |
| 32 |
integer(kind=4) :: q |
| 33 |
q = q + 1 |
| 34 |
end subroutine |
| 35 |
|
| 36 |
subroutine linear_add_one2(q) |
| 37 |
implicit none |
| 38 |
!$omp declare simd(linear_add_one2) linear(q: ref, step(2)) simdlen(8) |
| 39 |
integer(kind=4) :: q |
| 40 |
q = q + 1 |
| 41 |
end subroutine |
| 42 |
end module |