[flang-commits] [flang] [flang][OpenMP] Parse ORDERED as standalone when DEPEND/DOACROSS is p… (PR #156693)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu Sep 4 05:21:20 PDT 2025
================
@@ -52,27 +52,14 @@ program main
end do
!$omp end do
- !$omp do ordered(1)
- do i = 2, N
- !ERROR: DEPEND clauses are not allowed when ORDERED construct is a block construct with an ORDERED region
- !$omp ordered depend(source)
- arrayA(i) = foo(i)
- !$omp end ordered
----------------
tblah wrote:
I guess we could continue the pattern of parsing approximately and then generating better errors in semantics. Here we could allow stray OmpEndDirective as an OpenMPConstruct (lowest priority). I spent some time messing with it but while I could detect the error condition in parsing, I didn't find a sufficiently non-hacky way to print the error message because the parser doesn't distinguish between "this didn't parse" and "there is an error here".
https://github.com/llvm/llvm-project/pull/156693
More information about the flang-commits
mailing list