[flang-commits] [flang] [Flang][OpenMP] Added diagnostic for ORDERED THREADS SIMD inside plain SIMD region (PR #205723)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Jul 8 09:15:19 PDT 2026


https://github.com/tblah commented:

Basically LGTM. Sorry it took me a while to get to this.

Please could you add defensive test cases to make sure we keep accepting the case where the `ordered threads simd` region is in a called routine but dynamically encountered inside a valid `do simd ordered` region e.g.

```
!$omp do simd ordered
  do i = 1, n
    call contains_ordered_threads_simd()
  end do
  !$omp end do simd
```
  with:
```
  subroutine contains_ordered_threads_simd()
    !$omp ordered threads simd
    !$omp end ordered
  end subroutine
```

I think your PR already does the right thing (don't try to check for the ordered clause when the SIMD construct is not visible: this code structure should be allowed). I would just like it as a regression test.

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


More information about the flang-commits mailing list