[flang-commits] [flang] [Flang] [Semantics] [OpenMP] Fix semantic check to not report error for compound OMP TARGET directives. (PR #112059)

via flang-commits flang-commits at lists.llvm.org
Fri Oct 11 21:43:33 PDT 2024


================
@@ -2418,10 +2418,16 @@ void OmpAttributeVisitor::ResolveOmpObject(
                       Symbol::Flag::OmpLastPrivate, Symbol::Flag::OmpShared,
                       Symbol::Flag::OmpLinear};
 
-                  for (Symbol::Flag ompFlag1 : dataMappingAttributeFlags) {
-                    for (Symbol::Flag ompFlag2 : dataSharingAttributeFlags) {
-                      checkExclusivelists(
-                          hostAssocSym, ompFlag1, symbol, ompFlag2);
+                  // For OMP TARGET TEAMS directive some sharing attribute
+                  // flags and mapping attribute flags can co-exist.
+                  if (!(llvm::omp::allTeamsSet.test(GetContext().directive) ||
+                          llvm::omp::allParallelSet.test(
----------------
NimishMishra wrote:

Is `parallel` also a part of this check?

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


More information about the flang-commits mailing list