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

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Thu Sep 12 02:27:47 PDT 2024


================
@@ -1326,7 +1326,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
                                      bool isUnordered) {
     if (isUnordered || sym.has<Fortran::semantics::HostAssocDetails>() ||
         sym.has<Fortran::semantics::UseDetails>()) {
-      if (!shallowLookupSymbol(sym)) {
+      if (!shallowLookupSymbol(sym) &&
+          !sym.test(Fortran::semantics::Symbol::Flag::OmpShared)) {
----------------
tblah wrote:

Judging by the tests, I don't think we set the privatization flag on loop induction variables. Do you mean that the patch should be rewritten to instead set that flag?

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


More information about the flang-commits mailing list