[flang-commits] [flang] [Flang][OpenMP] Fix to variables not inheriting data sharing attributes (PR #74964)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Sat Dec 9 23:35:01 PST 2023


================
@@ -1910,7 +1910,8 @@ void OmpAttributeVisitor::Post(const parser::Name &name) {
       if (Symbol * found{currScope().FindSymbol(name.source)}) {
         if (symbol != found) {
           name.symbol = found; // adjust the symbol within region
-        } else if (GetContext().defaultDSA == Symbol::Flag::OmpNone) {
+        } else if (GetContext().defaultDSA == Symbol::Flag::OmpNone &&
+            !symbol->test(Symbol::Flag::OmpThreadprivate)) {
----------------
kiranchandramohan wrote:

Would including Threadprivate also into `IsObjectWithDSA` work?

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


More information about the flang-commits mailing list