[Mlir-commits] [flang] [mlir] [mlir][flang][OpenMP] Select iterators per locator and allow multi-block regions (PR #227454)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Oct 10 23:10:36 PDT 2026
================
@@ -6038,6 +6048,15 @@ void OmpStructureChecker::CheckArraySection(
for (const auto &subscript : arrayElement.Subscripts()) {
if (const auto *triplet{
std::get_if<parser::SubscriptTriplet>(&subscript.u)}) {
+ // OpenMP 5.2 3.2.5 allows a stride only in clauses that permit one.
+ // TODO: Also reject strides in DEPEND and REDUCTION, not just AFFINITY.
+ bool affinityStride{clause == llvm::omp::Clause::OMPC_affinity &&
----------------
chichunchen wrote:
The stride check now covers earlier part references in both AFFINITY and DEPEND, rejecting `a(1:8:1)%field(1)` while still accepting sections inside scalar subscript expressions, such as `b(sum(v(::2)))`.
https://github.com/llvm/llvm-project/pull/227454
More information about the Mlir-commits
mailing list