| 1 |
module m |
| 2 |
contains |
| 3 |
subroutine f1 (ar) |
| 4 |
integer :: arr(10) |
| 5 |
end |
| 6 |
subroutine f0 (ar) |
| 7 |
integer :: arr(10) |
| 8 |
!$omp declare variant (f1) match (construct={dispatch}) |
| 9 |
end |
| 10 |
end module |
| 11 |
|
| 12 |
subroutine call_it(ctx, arr) |
| 13 |
logical :: ctx |
| 14 |
integer :: arr(:) |
| 15 |
!$omp dispatch nocontext(ctx) |
| 16 |
call f0(arr) |
| 17 |
!$omp end dispatch ! valid since 5.2 |
| 18 |
!$omp dispatch nocontext(ctx) |
| 19 |
call f0(arr) |
| 20 |
!$omp end dispatch nowait ! likewise valid (unless there is a 'nowait' at '!$omp dispatch') |
| 21 |
!$omp dispatch nowait |
| 22 |
call f0(arr) |
| 23 |
!$omp end dispatch nowait !{ dg-error "Duplicated NOWAIT clause on !.OMP DISPATCH and !.OMP END DISPATCH at .1." } |
| 24 |
end |