[flang-commits] [flang] [Flang][OpenMP] DEFAULT(NONE) error checking on implicit references (PR #182214)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Thu Feb 19 10:22:26 PST 2026


================
@@ -2922,6 +2923,25 @@ void OmpAttributeVisitor::CreateImplicitSymbols(const Symbol *symbol) {
     //      Ideally, lowering should be changed and all implicit symbols
     //      should be marked with OmpImplicit.
 
+    if (dirContext.defaultDSA == Symbol::Flag::OmpNone) {
+      if (!symbol->GetUltimate().test(Symbol::Flag::OmpThreadprivate) &&
+          !symbol->test(Symbol::Flag::OmpPrivate)) {
----------------
luporl wrote:

It's better to check for OmpPreDetermined and OmpExplicit instead.

They are being handled by the `if (dsa.any())` block above, but adjustments may be necessary to support DSA clauses in nested constructs.

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


More information about the flang-commits mailing list