[flang-commits] [flang] [flang][OpenMP] Reject standalone block-associated variants (PR #213255)

Sairudra More via flang-commits flang-commits at lists.llvm.org
Sun Aug 2 21:13:12 PDT 2026


================
@@ -735,6 +737,19 @@ void OmpStructureChecker::Enter(const parser::OmpDirectiveSpecification &x) {
       }
     }
   }
+  if (!isDelimited && checkDefaultNoneInAssociatedLoop) {
+    OmpVariantMatchContext matchContext{context_};
+    if (currentWhenSelector_ &&
----------------
Saieiei wrote:

This guard skips `otherwise`/`default` variants because `currentWhenSelector_` is null for them, even though `MayVariantBeSelected(nullptr, ...)` treats them as potentially selectable. Could you handle fallback variants and add a regression test?

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


More information about the flang-commits mailing list