| 1 |
! { dg-do compile } |
| 2 |
|
| 3 |
! Check that a missing call does not cause a segfault |
| 4 |
|
| 5 |
module m |
| 6 |
use iso_c_binding |
| 7 |
implicit none(type,external) |
| 8 |
contains |
| 9 |
subroutine f(x,y,z) |
| 10 |
type(c_ptr) :: x,y,z |
| 11 |
end |
| 12 |
subroutine g(x,y,z) |
| 13 |
type(c_ptr) :: x,y,z |
| 14 |
!$omp declare variant(f) adjust_args(need_device_ptr: x,y) adjust_args(nothing : z,x) match(construct={dispatch}) |
| 15 |
end |
| 16 |
end |
| 17 |
|
| 18 |
use m |
| 19 |
implicit none(type,external) |
| 20 |
type(c_ptr) :: a,b,c |
| 21 |
!$omp dispatch |
| 22 |
g(a,b,c) ! { dg-error "'g' at .1. is not a variable" } |
| 23 |
! Should be: call g(a,b,c) |
| 24 |
end ! { dg-error "Unexpected END statement at .1." } |
| 25 |
! { dg-error "Unexpected end of file in .*" "" { target *-*-* } 0 } |