4 implicit none (type, external)
7 integer(kind
=1), target
:: a(4)
8 integer(kind
=1), pointer :: p
, q
10 d
= omp_get_default_device ()
11 id
= omp_get_initial_device ()
13 if (d
< 0 .or
. d
>= omp_get_num_devices ()) &
16 a
= transfer (int(z
'cdcdcdcd'), mold
=a
)
18 !$omp target enter data map (to:a)
20 a
= transfer (int(z
'abababab'), mold
=a
)
24 !$omp target enter data map (alloc:p, q)
27 if (omp_target_is_present (c_loc(a
), d
) == 0) &
29 if (omp_target_is_present (c_loc(p
), d
) == 0) &
31 if (omp_target_is_present (c_loc(q
), d
) == 0) &
35 !$omp target exit data map (release:a)
38 if (omp_target_is_present (c_loc(a
), d
) == 0) &
40 if (omp_target_is_present (c_loc(p
), d
) == 0) &
42 if (omp_target_is_present (c_loc(q
), d
) == 0) &
46 !$omp target exit data map (from:q)
49 if (omp_target_is_present (c_loc(a
), d
) /= 0) &
51 if (omp_target_is_present (c_loc(p
), d
) /= 0) &
53 if (omp_target_is_present (c_loc(q
), d
) /= 0) &
56 if (q
/= int(z
'cd', kind
=1)) &
58 if (p
/= int(z
'ab', kind
=1)) &