6 type(c_ptr
), optional
:: x
7 integer, pointer, optional
:: y
8 integer, allocatable
, optional
:: z
9 logical is_present
, is_null
10 is_present
= present(x
)
12 is_null
= .not
. c_associated(x
)
14 !$omp target is_device_ptr(x) has_device_addr(y) has_device_addr(z)
17 if (c_associated(x
)) stop 1
18 if (associated(y
)) stop 2
19 if (allocated(z
)) stop 3
21 if (.not
. c_associated(x
, c_loc(y
))) stop 4
33 integer, allocatable
:: a
36 !$omp target data map(p,a) use_device_addr(p,a)
37 call s(c_null_ptr
, p
, a
)
42 !$omp target data map(p,a) use_device_addr(p,a)
43 call s(c_loc(p
), p
, a
)