[flang-commits] [flang] [flang][OpenMP] Fix the creation of implicit symbols for locals (PR #233600)
Jason Van Beusekom via flang-commits
flang-commits at lists.llvm.org
Mon Oct 19 15:57:54 PDT 2026
================
@@ -2673,6 +2673,11 @@ void OmpAttributeVisitor::CreateImplicitSymbols(
Symbol::Flags dsa;
Scope &scope{context_.FindScope(dirContext.directiveSource)};
+ // Skip constructs that enclose the symbol declaration (e.g. in a nested
+ // BLOCK).
+ if (IsLocalInsideScope(symbol->GetUltimate(), scope)) {
+ continue;
+ }
----------------
Jason-Van-Beusekom wrote:
```suggestion
if (IsLocalInsideScope(symbol->GetUltimate(), scope))
continue;
```
https://github.com/llvm/llvm-project/pull/233600
More information about the flang-commits
mailing list