[flang-commits] [flang] [llvm] [flang][OpenMP] ORDERED clause is allowed on DO in 4.5+ (PR #225107)

Sairudra More via flang-commits flang-commits at lists.llvm.org
Tue Sep 22 05:15:52 PDT 2026


================
@@ -1563,6 +1563,7 @@ def OMP_DistributeParallelDo : Directive<[Spelling<"distribute parallel do">]> {
     VersionedClause<OMPC_Message, 60>,
     VersionedClause<OMPC_NumThreads>,
     VersionedClause<OMPC_Order, 50>,
+    VersionedClause<OMPC_Ordered>,
----------------
Saieiei wrote:

I may be missing a spec change or interpretation here. ordered is allowed on `do`, but [OpenMP 5.2 17.5](https://www.openmp.org/spec-html/5.2/openmpse105.html) says that if `directive-name-A` is `distribute`, the `ordered` clause must not be specified. [OpenMP 6.0 19.3](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf#page=561) states the restriction directly when `distribute` is a constituent-directive name. What rule are we relying on to allow `ordered` on these distribute-containing forms?

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


More information about the flang-commits mailing list