[Openmp-commits] [flang] [llvm] [mlir] [openmp] [Flang][OpenMP] Add support for interop construct (PR #203959)

Sunil Shrestha via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 8 09:51:52 PDT 2026


================
@@ -5872,7 +5872,12 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
     context_.Say(GetContext().directiveSource,
         "Each interop-type may be specified at most once."_err_en_US);
   }
-  if (isDependClauseOccurred && !targetSyncCount) {
+  // Only enforce the depend/targetsync constraint when an init clause is
+  // present on this directive. For use/destroy-only directives, the interop
+  // object's type was established at its init site, which may be in a
+  // different statement — we cannot verify it statically here.
+  bool hasInitClause = (targetCount > 0 || targetSyncCount > 0);
----------------
sshrestha-aa wrote:

Thank you for pointing out this change in OpenMP 6.0

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


More information about the Openmp-commits mailing list