[flang-commits] [flang] [llvm] [flang][OpenMP] Gate the allocate clause at OpenMP 5.0 (PR #213980)
via flang-commits
flang-commits at lists.llvm.org
Tue Aug 4 08:16:27 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
Author: Spencer Bryngelson (sbryngelson)
<details>
<summary>Changes</summary>
`allocate` is an OpenMP 5.0 clause, but 58 of the 62 directives that allow it declare it as
bare `VersionedClause<OMPC_Allocate>`. The default in `DirectiveBase.td` is `min = 1`:
```
class VersionedClause<Clause c, int min = 1, int max = 0x7FFFFFFF> : Versioned<min, max>
```
so those 58 accept the clause at every version. Only four are gated today: `do`, `taskgroup`
and `parallel do` at 50, and `scope` at 52.
This is reachable in practice because flang defaults to OpenMP 3.1
(`newestFullySupported = 31`, `CompilerInvocation.cpp`). An invocation with no
`-fopenmp-version=` lands in the ungated range, semantics accepts the clause, and
`ConstructDecomposition` then correctly refuses to decompose it. Lowering consumes the empty
result and crashes:
```
$ flang -fc1 -emit-hlfir -fopenmp repro.f90
Segmentation fault
```
In an assertions build it is caught at `Decomposer.cpp:85`:
```
Assertion `!decompose.output.empty() && "Construct decomposition failed"' failed.
```
With the gate, that becomes a diagnostic:
```
error: ALLOCATE clause is not allowed on TARGET TEAMS DISTRIBUTE PARALLEL DO directive
in OpenMP v3.1, try -fopenmp-version=50
```
Reported as #<!-- -->211430.
### Scope
This fixes reachability, not the underlying memory error, and should not be read as a complete
fix for #<!-- -->211430. Consuming a failed decomposition reads uninitialized memory, which is why the
crash is intermittent — measured on a release build at a pinned `-fopenmp-version=31`, 40 trials
each:
| | segfaults |
|---|---|
| ASLR on | 25/40 |
| ASLR off (`setarch -R`) | 0/40 |
Any other clause/directive combination that makes decomposition return empty will hit the same
path. Making that path diagnose and bail rather than fall through is a separate change.
I also left the gate uniform at 50 rather than tightening per directive. `allocators` is a 5.2
construct, so by the precedent `scope` sets its clause could be 52; that argument applies to
several directives here and depends on each one's introduction version, so it seemed better kept
out of a mechanical change.
### Tests
Nine tests exercised `allocate` through bare `%openmp_flags` (i.e. `-fopenmp` with no version) and
so depended on the missing gate. Seven get `-fopenmp-version=50`. The two `allocators` tests get
52, which is what their own `! OpenMP Version 5.2` header comments already claim they are testing.
### Verification
| suite | tests | failed |
|---|---|---|
| `check-flang` | 4808 | 0 |
| `mlir/test/Dialect/OpenMP`, `mlir/test/Target/LLVMIR`, `llvm/test/Frontend` | 425 | 0 |
| `clang/test/OpenMP` | 1594 | 0 |
clang version-checks `allocate` in its own semantic analysis rather than through this table, but
it shares `OMP.td`, so I ran it to confirm.
---
Patch is 26.86 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/213980.diff
10 Files Affected:
- (modified) flang/test/Lower/OpenMP/distribute.f90 (+1-1)
- (modified) flang/test/Lower/OpenMP/parallel-sections.f90 (+1-1)
- (modified) flang/test/Lower/OpenMP/parallel.f90 (+1-1)
- (modified) flang/test/Lower/OpenMP/sections.f90 (+2-2)
- (modified) flang/test/Lower/OpenMP/single.f90 (+2-2)
- (modified) flang/test/Lower/OpenMP/task.f90 (+1-1)
- (modified) flang/test/Lower/OpenMP/taskloop.f90 (+2-2)
- (modified) flang/test/Semantics/OpenMP/allocators02.f90 (+1-1)
- (modified) flang/test/Semantics/OpenMP/allocators03.f90 (+1-1)
- (modified) llvm/include/llvm/Frontend/OpenMP/OMP.td (+58-58)
``````````diff
diff --git a/flang/test/Lower/OpenMP/distribute.f90 b/flang/test/Lower/OpenMP/distribute.f90
index bd0e220c1989c..22c5a3a7451ae 100644
--- a/flang/test/Lower/OpenMP/distribute.f90
+++ b/flang/test/Lower/OpenMP/distribute.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-! RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
! CHECK-LABEL: func @_QPdistribute_simple
subroutine distribute_simple()
diff --git a/flang/test/Lower/OpenMP/parallel-sections.f90 b/flang/test/Lower/OpenMP/parallel-sections.f90
index 594725779c131..87bd9cd60a394 100644
--- a/flang/test/Lower/OpenMP/parallel-sections.f90
+++ b/flang/test/Lower/OpenMP/parallel-sections.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-!RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
+!RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
!===============================================================================
! Parallel sections construct
diff --git a/flang/test/Lower/OpenMP/parallel.f90 b/flang/test/Lower/OpenMP/parallel.f90
index c54b804fa04d3..744b88a37ae5d 100644
--- a/flang/test/Lower/OpenMP/parallel.f90
+++ b/flang/test/Lower/OpenMP/parallel.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-!RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
+!RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
!CHECK-LABEL: func @_QPparallel_simple
subroutine parallel_simple()
diff --git a/flang/test/Lower/OpenMP/sections.f90 b/flang/test/Lower/OpenMP/sections.f90
index a58227e4f5287..e3155661f35bc 100644
--- a/flang/test/Lower/OpenMP/sections.f90
+++ b/flang/test/Lower/OpenMP/sections.f90
@@ -2,8 +2,8 @@
! This test checks the lowering of OpenMP sections construct with several clauses present
-! RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
-! RUN: bbc -emit-hlfir %openmp_flags %s -o - | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
+! RUN: bbc -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
!CHECK: func @_QQmain() attributes {fir.bindc_name = "SAMPLE"} {
!CHECK: %[[COUNT:.*]] = fir.address_of(@_QFEcount) : !fir.ref<i32>
diff --git a/flang/test/Lower/OpenMP/single.f90 b/flang/test/Lower/OpenMP/single.f90
index 69c45630d6bc7..6e5aa638b8575 100644
--- a/flang/test/Lower/OpenMP/single.f90
+++ b/flang/test/Lower/OpenMP/single.f90
@@ -1,7 +1,7 @@
! REQUIRES: openmp_runtime
-!RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
-!RUN: bbc -emit-hlfir %openmp_flags %s -o - | FileCheck %s
+!RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
+!RUN: bbc -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
!===============================================================================
! Single construct
diff --git a/flang/test/Lower/OpenMP/task.f90 b/flang/test/Lower/OpenMP/task.f90
index 75c7a3f95a683..6e1dd8964cb72 100644
--- a/flang/test/Lower/OpenMP/task.f90
+++ b/flang/test/Lower/OpenMP/task.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-!RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
+!RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - | FileCheck %s
!CHECK-LABEL: func @_QPomp_task_simple() {
subroutine omp_task_simple
diff --git a/flang/test/Lower/OpenMP/taskloop.f90 b/flang/test/Lower/OpenMP/taskloop.f90
index a8a9dcfa210cd..94e4e2947fa71 100644
--- a/flang/test/Lower/OpenMP/taskloop.f90
+++ b/flang/test/Lower/OpenMP/taskloop.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-! RUN: bbc -emit-hlfir %openmp_flags -o - %s 2>&1 | FileCheck %s
-! RUN: %flang_fc1 -emit-hlfir %openmp_flags -o - %s 2>&1 | FileCheck %s
+! RUN: bbc -emit-hlfir %openmp_flags -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
! CHECK-LABEL: omp.private
! CHECK-SAME: {type = private} @[[LAST_PRIVATE_I:.*]] : i32
diff --git a/flang/test/Semantics/OpenMP/allocators02.f90 b/flang/test/Semantics/OpenMP/allocators02.f90
index ce6315556f493..e0ebb58c0b3c0 100644
--- a/flang/test/Semantics/OpenMP/allocators02.f90
+++ b/flang/test/Semantics/OpenMP/allocators02.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=52
! OpenMP Version 5.2
! 6.7 allocators construct
! A variable that is part of another variable (as an array or
diff --git a/flang/test/Semantics/OpenMP/allocators03.f90 b/flang/test/Semantics/OpenMP/allocators03.f90
index 81259b997372b..ad4b1f7046301 100644
--- a/flang/test/Semantics/OpenMP/allocators03.f90
+++ b/flang/test/Semantics/OpenMP/allocators03.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
+! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=52
! OpenMP Version 5.2
! 6.7 allocators construct
! Only the allocate clause is allowed on the allocators construct
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index a119dff67c30e..037a506c8b175 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -668,7 +668,7 @@ def OMP_Allocate : Directive<[Spelling<"allocate">]> {
}
def OMP_Allocators : Directive<[Spelling<"allocators">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
];
let association = AS_Block;
let category = CA_Executable;
@@ -900,7 +900,7 @@ def OMP_dispatch : Directive<[Spelling<"dispatch">]> {
}
def OMP_Distribute : Directive<[Spelling<"distribute">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_Private>,
@@ -970,7 +970,7 @@ def OMP_Flush : Directive<[Spelling<"flush">]> {
}
def OMP_For : Directive<[Spelling<"for">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_Linear>,
@@ -1098,7 +1098,7 @@ def OMP_Ordered : Directive<[Spelling<"ordered">]> {
}
def OMP_Parallel : Directive<[Spelling<"parallel">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1167,7 +1167,7 @@ def OMP_Section : Directive<[Spelling<"section">]> {
}
def OMP_Sections : Directive<[Spelling<"sections">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_Private>,
@@ -1182,7 +1182,7 @@ def OMP_Sections : Directive<[Spelling<"sections">]> {
def OMP_Simd : Directive<[Spelling<"simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_If, 50>,
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_Linear>,
@@ -1201,7 +1201,7 @@ def OMP_Simd : Directive<[Spelling<"simd">]> {
}
def OMP_Single : Directive<[Spelling<"single">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_CopyPrivate>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_Private>,
@@ -1214,7 +1214,7 @@ def OMP_Single : Directive<[Spelling<"single">]> {
}
def OMP_Target : Directive<[Spelling<"target">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -1311,7 +1311,7 @@ def OMP_TargetUpdate : Directive<[Spelling<"target update", 1, 52>,
def OMP_Task : Directive<[Spelling<"task">]> {
let allowedClauses = [
VersionedClause<OMPC_Affinity, 50>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1355,7 +1355,7 @@ def OMP_TaskGroup : Directive<[Spelling<"taskgroup">]> {
}
def OMP_TaskLoop : Directive<[Spelling<"taskloop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_InReduction>,
VersionedClause<OMPC_If>,
@@ -1400,7 +1400,7 @@ def OMP_TaskYield : Directive<[Spelling<"taskyield">]> {
}
def OMP_Teams : Directive<[Spelling<"teams">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If, 52>,
@@ -1508,7 +1508,7 @@ def OMP_Workdistribute : Directive<[Spelling<"workdistribute">]> {
def OMP_DistributeParallelDo : Directive<[Spelling<"distribute parallel do">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1537,7 +1537,7 @@ def OMP_DistributeParallelDoSimd
: Directive<[Spelling<"distribute parallel do simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1568,7 +1568,7 @@ def OMP_DistributeParallelDoSimd
def OMP_DistributeParallelFor
: Directive<[Spelling<"distribute parallel for">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1597,7 +1597,7 @@ def OMP_DistributeParallelForSimd
: Directive<[Spelling<"distribute parallel for simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1629,7 +1629,7 @@ def OMP_DistributeParallelForSimd
def OMP_DistributeSimd : Directive<[Spelling<"distribute simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If, 50>,
@@ -1681,7 +1681,7 @@ def OMP_DoSimd : Directive<[Spelling<"do simd">]> {
def OMP_ForSimd : Directive<[Spelling<"for simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If, 50>,
VersionedClause<OMPC_LastPrivate>,
@@ -1704,7 +1704,7 @@ def OMP_ForSimd : Directive<[Spelling<"for simd">]> {
}
def OMP_target_loop : Directive<[Spelling<"target loop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -1735,7 +1735,7 @@ def OMP_target_loop : Directive<[Spelling<"target loop">]> {
}
def OMP_MaskedTaskloop : Directive<[Spelling<"masked taskloop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
VersionedClause<OMPC_InReduction>,
@@ -1762,7 +1762,7 @@ def OMP_MaskedTaskloop : Directive<[Spelling<"masked taskloop">]> {
def OMP_MaskedTaskloopSimd : Directive<[Spelling<"masked taskloop simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
VersionedClause<OMPC_InReduction>,
@@ -1793,7 +1793,7 @@ def OMP_MaskedTaskloopSimd : Directive<[Spelling<"masked taskloop simd">]> {
}
def OMP_MasterTaskloop : Directive<[Spelling<"master taskloop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
VersionedClause<OMPC_InReduction>,
@@ -1819,7 +1819,7 @@ def OMP_MasterTaskloop : Directive<[Spelling<"master taskloop">]> {
def OMP_MasterTaskloopSimd : Directive<[Spelling<"master taskloop simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
VersionedClause<OMPC_InReduction>,
@@ -1877,7 +1877,7 @@ def OMP_ParallelDo : Directive<[Spelling<"parallel do">]> {
def OMP_ParallelDoSimd : Directive<[Spelling<"parallel do simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1907,7 +1907,7 @@ def OMP_ParallelDoSimd : Directive<[Spelling<"parallel do simd">]> {
}
def OMP_ParallelFor : Directive<[Spelling<"parallel for">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1936,7 +1936,7 @@ def OMP_ParallelFor : Directive<[Spelling<"parallel for">]> {
def OMP_ParallelForSimd : Directive<[Spelling<"parallel for simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1967,7 +1967,7 @@ def OMP_ParallelForSimd : Directive<[Spelling<"parallel for simd">]> {
}
def OMP_parallel_loop : Directive<[Spelling<"parallel loop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -1992,7 +1992,7 @@ def OMP_parallel_loop : Directive<[Spelling<"parallel loop">]> {
}
def OMP_ParallelMasked : Directive<[Spelling<"parallel masked">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2015,7 +2015,7 @@ def OMP_ParallelMasked : Directive<[Spelling<"parallel masked">]> {
def OMP_ParallelMaskedTaskloop
: Directive<[Spelling<"parallel masked taskloop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2048,7 +2048,7 @@ def OMP_ParallelMaskedTaskloopSimd
: Directive<[Spelling<"parallel masked taskloop simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2084,7 +2084,7 @@ def OMP_ParallelMaskedTaskloopSimd
}
def OMP_ParallelMaster : Directive<[Spelling<"parallel master">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2106,7 +2106,7 @@ def OMP_ParallelMaster : Directive<[Spelling<"parallel master">]> {
def OMP_ParallelMasterTaskloop
: Directive<[Spelling<"parallel master taskloop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2138,7 +2138,7 @@ def OMP_ParallelMasterTaskloopSimd
: Directive<[Spelling<"parallel master taskloop simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2173,7 +2173,7 @@ def OMP_ParallelMasterTaskloopSimd
}
def OMP_ParallelSections : Directive<[Spelling<"parallel sections">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2195,7 +2195,7 @@ def OMP_ParallelSections : Directive<[Spelling<"parallel sections">]> {
}
def OMP_ParallelWorkshare : Directive<[Spelling<"parallel workshare">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2216,7 +2216,7 @@ def OMP_ParallelWorkshare : Directive<[Spelling<"parallel workshare">]> {
}
def OMP_TargetParallel : Directive<[Spelling<"target parallel">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2284,7 +2284,7 @@ def OMP_TargetParallelDoSimd
: Directive<[Spelling<"target parallel do simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2322,7 +2322,7 @@ def OMP_TargetParallelDoSimd
}
def OMP_TargetParallelFor : Directive<[Spelling<"target parallel for">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2362,7 +2362,7 @@ def OMP_TargetParallelForSimd
: Directive<[Spelling<"target parallel for simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2403,7 +2403,7 @@ def OMP_TargetParallelForSimd
}
def OMP_target_parallel_loop : Directive<[Spelling<"target parallel loop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2439,7 +2439,7 @@ def OMP_target_parallel_loop : Directive<[Spelling<"target parallel loop">]> {
def OMP_TargetSimd : Directive<[Spelling<"target simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2477,7 +2477,7 @@ def OMP_TargetSimd : Directive<[Spelling<"target simd">]> {
}
def OMP_TargetTeams : Directive<[S...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/213980
More information about the flang-commits
mailing list