2 ! Ensure that a mapping with no argument works
5 ! { dg-additional-options -foffload-options=nvptx-none=-misa=sm_35 { target offload_target_nvptx } }
8 implicit none (type, external)
10 integer :: dev_num2
= -1
13 use omp_lib
, only
: omp_get_device_num
15 dev_num2
= omp_get_device_num()
21 !$omp requires reverse_offload
22 implicit none (type, external)
23 integer :: dev_num
= -1
24 !$omp target map(from:dev_num)
25 dev_num
= omp_get_device_num()
26 ! This calls GOMP_target_ext with number of maps = 0
27 !$omp target device(ancestor:1)
32 if (omp_get_num_devices() > 0 .and
. dev_num2
== dev_num
) stop 1