[flang-commits] [flang] [flang][OpenACC] Relax COMMON block usage restriction in OpenACC directives (PR #162659)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Thu Oct 16 13:05:47 PDT 2025
================
@@ -3627,6 +3627,28 @@ void ModuleVisitor::Post(const parser::UseStmt &x) {
}
}
}
+ // Go through the list of COMMON block symbols in the module scope and add
+ // their USE association to the current scope's USE-associated COMMON blocks.
+ for (const auto &[name, symbol] : useModuleScope_->commonBlocks()) {
+ if (Symbol *localCB{currScope().FindCommonBlockInSurroundingScopes(name)};
----------------
klausler wrote:
`if (!currScope().FindCommonBlock(...)) {` would avoid this confusing usage of a local name.
https://github.com/llvm/llvm-project/pull/162659
More information about the flang-commits
mailing list