| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/106566 |
| 4 |
! |
| 5 |
|
| 6 |
subroutine add_one2(p) |
| 7 |
implicit none |
| 8 |
procedure(add_one2) :: ext1 |
| 9 |
!$omp declare simd(ext1) linear(p: ref) simdlen(8) ! { dg-error "OMP DECLARE SIMD should refer to containing procedure 'add_one2'" } |
| 10 |
integer :: p |
| 11 |
|
| 12 |
p = p + 1 |
| 13 |
end subroutine |
| 14 |
|
| 15 |
subroutine linear_add_one2(p) |
| 16 |
implicit none |
| 17 |
procedure(linear_add_one2) :: ext2 |
| 18 |
!$omp declare simd(ext2) linear(p: ref, step(2)) simdlen(8) ! { dg-error "OMP DECLARE SIMD should refer to containing procedure 'linear_add_one2'" } |
| 19 |
integer :: p |
| 20 |
|
| 21 |
p = p + 1 |
| 22 |
end subroutine |
| 23 |
|
| 24 |
module m |
| 25 |
integer, parameter :: NN = 1023 |
| 26 |
integer :: a(NN) |
| 27 |
contains |
| 28 |
subroutine some_proc(r) |
| 29 |
integer :: r |
| 30 |
end subroutine |
| 31 |
subroutine module_add_one2(q) |
| 32 |
implicit none |
| 33 |
!$omp declare simd(some_proc) linear(q: ref) simdlen(8) ! { dg-error "OMP DECLARE SIMD should refer to containing procedure 'module_add_one2'" } |
| 34 |
integer :: q |
| 35 |
q = q + 1 |
| 36 |
end subroutine |
| 37 |
|
| 38 |
subroutine module_linear_add_one2(q) |
| 39 |
implicit none |
| 40 |
interface |
| 41 |
subroutine other_proc(r) |
| 42 |
integer :: r |
| 43 |
end subroutine |
| 44 |
end interface |
| 45 |
!$omp declare simd(other_proc) linear(q: ref, step(2)) simdlen(8) ! { dg-error "OMP DECLARE SIMD should refer to containing procedure 'module_linear_add_one2'" } |
| 46 |
integer :: q |
| 47 |
q = q + 1 |
| 48 |
end subroutine |
| 49 |
end module |