[flang-commits] [flang] [llvm] [flang][OpenMP] Gate the allocate clause at OpenMP 5.0 (PR #213980)

Spencer Bryngelson via flang-commits flang-commits at lists.llvm.org
Tue Aug 4 12:05:45 PDT 2026


sbryngelson wrote:

Added `flang/test/Semantics/OpenMP/allocate-clause-version.f90`, which checks the clause is
rejected pre-5.0 on `parallel`, `single`, `task` and `target teams distribute parallel do`. Those
are all directives this patch newly gates; `do`, `parallel do`, `taskgroup` and `scope` are
deliberately left out, since they were gated already and would pass either way. Verified it fails
against an unpatched build and passes with the patch, so it does exercise the gate rather than
just the diagnostic text. The version is pinned rather than defaulted so the expected message does
not move if the default OpenMP version changes.

Agreed on the split. #214012 is the crash fix and stands alone; this one is only worth landing for
the better diagnostic, and only once the clang side has been agreed. I have not added clang
reviewers yet since the question of whether to update those 85 tests here or drop this is still
open -- happy to do either.


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


More information about the flang-commits mailing list