[flang-commits] [flang] [Flang] [Semantics] [OpenMP] Added missing semantic check with nested target region. (PR #115344)

Raghu Maddhipatla via flang-commits flang-commits at lists.llvm.org
Thu Nov 21 07:33:02 PST 2024


================
@@ -50,4 +50,28 @@ program main
   !$omp end target
   deallocate(B)
 
+  n1 = 10
+  n2 = 10
+  !$omp target teams map(to:a)
+  !PORTABILITY: If TARGET DATA directive is nested inside TARGET region, the behaviour is unspecified
+  !$omp target data map(n1,n2)
+  do i=1, n1
+     do j=1, n2
+      res((i-1)*10+j) = i*j
+     end do
+  end do
+  !$omp end target data
+  !$omp end target teams
+
+  !$omp target teams map(to:a) map(from:n1,n2)
+  !PORTABILITY: If TARGET TEAMS DISTRIBUTE PARALLEL DO directive is nested inside TARGET region, the behaviour is unspecified
+  !$omp target teams distribute parallel do
----------------
raghavendhra wrote:

requires reverse_offload is not in consideration for this PR right now.. Will handle this case in separate PR once some support related to requires reverse_offload is added.
 

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


More information about the flang-commits mailing list