| 1 |
! Test translation of OMP clause adjust_args |
| 2 |
! { dg-do compile } |
| 3 |
|
| 4 |
module main |
| 5 |
use iso_c_binding, only: c_ptr |
| 6 |
implicit none |
| 7 |
type(c_ptr) :: b ! { dg-error "List item 'b' at .1., declared at .2., is not a dummy argument" } |
| 8 |
|
| 9 |
contains |
| 10 |
subroutine base2 (a) |
| 11 |
type(c_ptr), intent(inout) :: a |
| 12 |
!$omp declare variant (variant2) match (construct={parallel}) adjust_args (need_device_ptr: a) ! { dg-error "the 'adjust_args' clause can only be specified if the 'dispatch' selector of the construct selector set appears in the 'match' clause at .1." } |
| 13 |
end subroutine |
| 14 |
subroutine base3 (a) |
| 15 |
type(c_ptr), intent(inout) :: a |
| 16 |
!$omp declare variant (variant2) match (construct={dispatch}) adjust_args (need_device_ptr: a) adjust_args (need_device_ptr: a) ! { dg-error "'a' at .1. is specified more than once" } |
| 17 |
end subroutine |
| 18 |
subroutine base4 (a) |
| 19 |
type(c_ptr), intent(inout) :: a |
| 20 |
!$omp declare variant (variant2) match (construct={dispatch}) adjust_args (need_device_ptr: b) ! { dg-error "List item 'b' at .1., declared at .2., is not a dummy argument" } |
| 21 |
end subroutine |
| 22 |
|
| 23 |
subroutine variant2 (a) |
| 24 |
type(c_ptr), intent(inout) :: a |
| 25 |
end subroutine |
| 26 |
|
| 27 |
end module |