[flang-commits] [flang] [Flang][OpenMp] Fix to threadprivate not working with host-association. (PR #74966)

via flang-commits flang-commits at lists.llvm.org
Wed Dec 20 20:32:04 PST 2023


================
@@ -1996,9 +1996,11 @@ static void threadPrivatizeVars(Fortran::lower::AbstractConverter &converter,
   };
 
   llvm::SetVector<const Fortran::semantics::Symbol *> threadprivateSyms;
-  converter.collectSymbolSet(
-      eval, threadprivateSyms,
-      Fortran::semantics::Symbol::Flag::OmpThreadprivate);
+  // Considering Host associated symbols as well.
+  converter.collectSymbolSet(eval, threadprivateSyms,
----------------
NimishMishra wrote:

Could you once check how does this patch behave once https://github.com/llvm/llvm-project/pull/72510 is merged? If there are some discrepancies, one of these patches would need modifications. Reason being, so far, only default clause lowering was using the two boolean parameters in `collectSymbolSet`. Now we are extending that to threadprivate, so I am curious how that turns out.

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


More information about the flang-commits mailing list