[Openmp-commits] [openmp] [OpenMP][flang] Adding more tests for commonblock with target map (PR #71146)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 1 08:51:16 PST 2023


================
@@ -26,11 +30,14 @@ subroutine check_device
   !$omp target map(tofrom:devices)
     devices(2) = omp_get_device_num()
   !$omp end target
+  print *, omp_get_num_devices()
+  !CHECK: [[ND:[0-9]+]]
+  print *, omp_get_default_device()
+  !CHECK: [[DD:[0-9]+]]
+  !CHECK: devices: [[ND]] [[DD]]
   print *, "devices: ", devices
 end subroutine check_device
 
-!CHECK: devices: 1 0
-
 !-----
 
 subroutine commonblock_simple_with_implicit_type
----------------
shraiysh wrote:

This test checks if a variable with implicit type gets mapped accurately. This test does not check the implicit mapping. I will rename it to `commonblock_simple_with_implicit_type_var`.

https://github.com/llvm/llvm-project/pull/71146


More information about the Openmp-commits mailing list