[flang-commits] [flang] [flang][OpenMP] Add semantic checks for two DECLARE VARIANT restrictions (PR #209528)
Sairudra More via flang-commits
flang-commits at lists.llvm.org
Tue Jul 21 00:59:19 PDT 2026
================
@@ -878,6 +878,33 @@ static bool CheckVariantAccessibility(SemanticsContext &context,
return false;
}
+// Collect the construct selector set of `sel` into `constructs` as an ordered
+// list of leaf construct directives. Combined and composite constructs are
+// decomposed into their leaves (e.g. `target teams` -> target, teams), so two
+// match selectors have the same construct selector set iff the collected lists
+// are equal. An absent construct selector yields an empty list.
+static void CollectConstructSelectorSet(
----------------
Saieiei wrote:
I verified the latest head (0195a747): the original `simdlen(4)` versus `simdlen(8)` case is now correctly diagnosed. One remaining question is whether selector equality should be structural or semantic, since the current comparison also distinguishes `simdlen(4)` from `simdlen(2+2)`. [OpenMP 5.2 ยง7.5](https://www.openmp.org/spec-html/5.2/openmpse46.html) does not appear to clarify this. Could you confirm that structural equality is intended?
https://github.com/llvm/llvm-project/pull/209528
More information about the flang-commits
mailing list