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

via flang-commits flang-commits at lists.llvm.org
Sun Feb 4 11:09:51 PST 2024


================
@@ -508,7 +509,10 @@ void Fortran::lower::HostAssociations::addSymbolsToBind(
          "must be initially empty");
   this->hostScope = &hostScope;
   for (const auto *s : symbols)
-    if (Fortran::lower::symbolIsGlobal(*s)) {
+    // GlobalOp are created for non-global threadprivate variable,
----------------
NimishMishra wrote:

Might be better to bring in the discussion on implicit SAVE here as well: https://github.com/llvm/llvm-project/blob/dea855de46bd4d3e103646a7f459856d88dd7488/flang/lib/Lower/OpenMP.cpp#L3940. Technically, an implicit SAVE attribute is what we consider, thereby requiring GlobalOp for non-global threadprivate vars.

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


More information about the flang-commits mailing list