[flang-commits] [flang] [flang][OpenMP] don't privatise loop index marked shared (PR #108176)

Mats Petersson via flang-commits flang-commits at lists.llvm.org
Thu Sep 12 07:36:51 PDT 2024


================
@@ -2173,7 +2178,7 @@ void OmpAttributeVisitor::CreateImplicitSymbols(
       // TODO 5) dummy arg in orphaned taskgen construct -> firstprivate
       if (prevDSA == Symbol::Flag::OmpShared) {
         // 6) shared in enclosing context -> shared
-        makeSharedSymbol();
+        makeSharedSymbol(/*setFlag=*/false);
----------------
Leporacanthicus wrote:

Thanks for your comment, it confirms that my new fix for the `!$omp parallel default(shared)` is likely the right way to go.

Apologies also if the comments here are a bit confusing. I started this work, but Tom helped out with an alternative version, and that's the one that I pushed for review]. 

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


More information about the flang-commits mailing list