From 1973b57fb0282a44cc4dd18afe57cd486fda143b Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 27 Jan 2021 10:07:06 -0500 Subject: [PATCH] [flang][openacc] Fix clause restriction for exit data directive Restriction on clauses for the EXIT DATA directive were not fully correct. This patch fixes the situation. The async, if and finalize clauses are allowed only once. Reviewed By: SouraVX Differential Revision: https://reviews.llvm.org/D95470 --- include/llvm/Frontend/OpenACC/ACC.td | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/llvm/Frontend/OpenACC/ACC.td b/include/llvm/Frontend/OpenACC/ACC.td index c9bddbe4823..67621052648 100644 --- a/include/llvm/Frontend/OpenACC/ACC.td +++ b/include/llvm/Frontend/OpenACC/ACC.td @@ -492,9 +492,11 @@ def ACC_EnterData : Directive<"enter data"> { // 2.14.7 def ACC_ExitData : Directive<"exit data"> { let allowedClauses = [ + VersionedClause + ]; + let allowedOnceClauses = [ VersionedClause, VersionedClause, - VersionedClause, VersionedClause ]; let requiredClauses = [