[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:30 PDT 2026
https://github.com/sbryngelson updated https://github.com/llvm/llvm-project/pull/213980
>From 71cf623bcdaa6aa18db32a6c35b9d233d6dd3adb Mon Sep 17 00:00:00 2001
From: Spencer Bryngelson <sbryngelson at gmail.com>
Date: Tue, 4 Aug 2026 10:15:15 -0500
Subject: [PATCH] Gate the OpenMP allocate clause at version 5.0, where it was
introduced.
---
flang/test/Lower/OpenMP/distribute.f90 | 2 +-
flang/test/Lower/OpenMP/parallel-sections.f90 | 2 +-
flang/test/Lower/OpenMP/parallel.f90 | 2 +-
flang/test/Lower/OpenMP/sections.f90 | 4 +-
flang/test/Lower/OpenMP/single.f90 | 4 +-
flang/test/Lower/OpenMP/task.f90 | 2 +-
flang/test/Lower/OpenMP/taskloop.f90 | 4 +-
.../OpenMP/allocate-clause-version.f90 | 47 +++++++
flang/test/Semantics/OpenMP/allocators02.f90 | 2 +-
flang/test/Semantics/OpenMP/allocators03.f90 | 2 +-
llvm/include/llvm/Frontend/OpenMP/OMP.td | 116 +++++++++---------
11 files changed, 117 insertions(+), 70 deletions(-)
create mode 100644 flang/test/Semantics/OpenMP/allocate-clause-version.f90
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/allocate-clause-version.f90 b/flang/test/Semantics/OpenMP/allocate-clause-version.f90
new file mode 100644
index 0000000000000..42db4e500b37d
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/allocate-clause-version.f90
@@ -0,0 +1,47 @@
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=45
+
+! The ALLOCATE clause was introduced in OpenMP 5.0, so before that it must be
+! rejected rather than accepted and handed to lowering, which cannot decompose
+! it -- see llvm-project#211430.
+!
+! Every directive below was previously ungated, i.e. it accepted the clause at
+! any version. `do`, `parallel do`, `taskgroup` and `scope` are deliberately
+! not covered here: they were already gated before this change, so they would
+! pass with or without it and would not exercise the new gate.
+!
+! The version is pinned rather than left to default so the expected message
+! stays stable if the default OpenMP version changes.
+
+subroutine allocate_pre50(n, a, b)
+ integer :: n, i
+ real :: a(n), b(n)
+ real :: t
+
+ !ERROR: ALLOCATE clause is not allowed on PARALLEL directive in OpenMP v4.5, try -fopenmp-version=50
+ !$omp parallel private(t) allocate(t)
+ t = a(1)
+ b(1) = t
+ !$omp end parallel
+
+ !ERROR: ALLOCATE clause is not allowed on SINGLE directive in OpenMP v4.5, try -fopenmp-version=50
+ !$omp single private(t) allocate(t)
+ t = a(1)
+ b(1) = t
+ !$omp end single
+
+ !ERROR: ALLOCATE clause is not allowed on TASK directive in OpenMP v4.5, try -fopenmp-version=50
+ !$omp task private(t) allocate(t)
+ t = a(1)
+ b(1) = t
+ !$omp end task
+
+ ! The form reported in llvm-project#211430, where the ungated clause reached
+ ! lowering and crashed it.
+ !ERROR: ALLOCATE clause is not allowed on TARGET TEAMS DISTRIBUTE PARALLEL DO directive in OpenMP v4.5, try -fopenmp-version=50
+ !$omp target teams distribute parallel do private(t) allocate(t)
+ do i = 1, n
+ t = a(i)
+ b(i) = t
+ end do
+ !$omp end target teams distribute parallel do
+end subroutine
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<[Spelling<"target teams">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2507,7 +2507,7 @@ def OMP_TargetTeams : Directive<[Spelling<"target teams">]> {
def OMP_TargetTeamsDistribute
: Directive<[Spelling<"target teams distribute">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2540,7 +2540,7 @@ def OMP_TargetTeamsDistribute
def OMP_TargetTeamsDistributeParallelDo
: Directive<[Spelling<"target teams distribute parallel do">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2580,7 +2580,7 @@ def OMP_TargetTeamsDistributeParallelDoSimd
: Directive<[Spelling<"target teams distribute 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>,
@@ -2622,7 +2622,7 @@ def OMP_TargetTeamsDistributeParallelDoSimd
def OMP_TargetTeamsDistributeParallelFor
: Directive<[Spelling<"target teams distribute parallel for">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2663,7 +2663,7 @@ def OMP_TargetTeamsDistributeParallelForSimd
: Directive<[Spelling<"target teams distribute 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>,
@@ -2708,7 +2708,7 @@ def OMP_TargetTeamsDistributeSimd
: Directive<[Spelling<"target teams distribute simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2744,7 +2744,7 @@ def OMP_TargetTeamsDistributeSimd
}
def OMP_TargetTeamsWorkdistribute : Directive<[Spelling<"target teams workdistribute">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_HasDeviceAddr, 51>,
@@ -2773,7 +2773,7 @@ def OMP_TargetTeamsWorkdistribute : Directive<[Spelling<"target teams workdistri
}
def OMP_target_teams_loop : Directive<[Spelling<"target teams loop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2806,7 +2806,7 @@ def OMP_target_teams_loop : Directive<[Spelling<"target teams loop">]> {
def OMP_TaskLoopSimd : Directive<[Spelling<"taskloop simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
VersionedClause<OMPC_InReduction>,
@@ -2838,7 +2838,7 @@ def OMP_TaskLoopSimd : Directive<[Spelling<"taskloop simd">]> {
}
def OMP_TeamsDistribute : Directive<[Spelling<"teams distribute">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2862,7 +2862,7 @@ def OMP_TeamsDistribute : Directive<[Spelling<"teams distribute">]> {
def OMP_TeamsDistributeParallelDo
: Directive<[Spelling<"teams distribute parallel do">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2894,7 +2894,7 @@ def OMP_TeamsDistributeParallelDoSimd
: Directive<[Spelling<"teams distribute parallel do simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If>,
@@ -2928,7 +2928,7 @@ def OMP_TeamsDistributeParallelDoSimd
def OMP_TeamsDistributeParallelFor
: Directive<[Spelling<"teams distribute parallel for">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
@@ -2960,7 +2960,7 @@ def OMP_TeamsDistributeParallelForSimd
: Directive<[Spelling<"teams distribute parallel for simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_LastPrivate>,
@@ -2995,7 +2995,7 @@ def OMP_TeamsDistributeParallelForSimd
def OMP_TeamsDistributeSimd : Directive<[Spelling<"teams distribute simd">]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If, 50>,
@@ -3022,7 +3022,7 @@ def OMP_TeamsDistributeSimd : Directive<[Spelling<"teams distribute simd">]> {
}
def OMP_TeamsWorkdistribute : Directive<[Spelling<"teams workdistribute">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If, 52>,
VersionedClause<OMPC_OMPX_Attribute>,
@@ -3041,7 +3041,7 @@ def OMP_TeamsWorkdistribute : Directive<[Spelling<"teams workdistribute">]> {
}
def OMP_teams_loop : Directive<[Spelling<"teams loop">]> {
let allowedClauses = [
- VersionedClause<OMPC_Allocate>,
+ VersionedClause<OMPC_Allocate, 50>,
VersionedClause<OMPC_DynGroupprivate, 61>,
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_If, 52>,
More information about the flang-commits
mailing list