22 lines · plain
1! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols %s | FileCheck %s2! OpenMP Version 5.03! 2.10.1 use_device_ptr clause4! List items that appear in a use_device_ptr clause are converted into device5! pointers to the corresponding list item in the device data environment.6 7subroutine omp_target_data8 use iso_c_binding9 integer :: a(1024)10 !CHECK: b size=8 offset=4096: ObjectEntity type: TYPE(c_ptr)11 type(C_PTR) :: b12 integer, pointer :: arrayB13 a = 114 !$omp target data map(tofrom: a, arrayB) use_device_ptr(b)15 !CHECK: b (OmpUseDevicePtr): HostAssoc16 allocate(arrayB)17 call c_f_pointer(b, arrayB)18 a = arrayB19 !$omp end target data20end subroutine omp_target_data21 22