[flang-commits] [flang] [flang][mlir] Add flang to mlir lowering for groupprivate (PR #180934)

via flang-commits flang-commits at lists.llvm.org
Tue Jun 9 00:12:08 PDT 2026


================
@@ -408,6 +408,30 @@ static void PutOpenMPDeclarativeDirectives(llvm::raw_ostream &os,
         decls->printClauseSet(os, dtgt, symbol.name());
         os << "\n";
       }
+      // Re-emit `!$omp groupprivate` (and any recorded device_type) so a TU
+      // that `use`s this module recovers the directive from the .mod file.
+      // Common-block names must be wrapped in slashes when reparsed.
+      if (symbol.test(Symbol::Flag::OmpGroupPrivate)) {
+        os << "!$omp groupprivate(";
----------------
skc7 wrote:

Updated in latest patch.

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


More information about the flang-commits mailing list