[all-commits] [llvm/llvm-project] 810e67: [flang][OpenMP] Fix crash on standalone ordered wi...
Carlos Seo via All-commits
all-commits at lists.llvm.org
Thu May 28 13:07:14 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 810e67f50d8f149c0c88cbda1707b52b7ae9936f
https://github.com/llvm/llvm-project/commit/810e67f50d8f149c0c88cbda1707b52b7ae9936f
Author: Carlos Seo <carlos.seo at linaro.org>
Date: 2026-05-28 (Thu, 28 May 2026)
Changed paths:
M flang/lib/Lower/OpenMP/Clauses.cpp
A flang/test/Lower/OpenMP/Todo/ordered-depend.f90
M llvm/include/llvm/Frontend/OpenMP/ClauseT.h
Log Message:
-----------
[flang][OpenMP] Fix crash on standalone ordered with depend(source|sink:) (#200193)
A standalone ordered construct using the pre-OpenMP 5.2 depend(source) /
depend(sink:) spelling crashed flang with an assertion failure in
buildConstructQueue ("Construct decomposition failed"), or emitted a
TODO when assertions were disabled.
These dependence types are valid on ordered since OpenMP 4.5, but flang
represents them internally as a doacross clause, which construct
decomposition only accepts from OpenMP 5.2. As a result, decomposition
produced an empty output and tripped the assertion at every OpenMP
version below 5.2 (including the default 3.1).
Lowering of the standalone ordered directive is not implemented yet
(genOrderedOp only emits a "not yet implemented" message and ignores the
construct queue). Build the construct queue only for the
block-associated variant and emit the TODO directly for the standalone
directive, so the decomposition that would otherwise assert is no longer
reached.
Note: at versions below 4.5 the construct is technically invalid, but
flang's semantics accepts it silently. Making semantics emit a "requires
OpenMP 4.5" error/warning is probably a good idea.
Fixes #198972
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list