[PATCH] D95473: [flang][openacc] Fix clause restriction for host_data directive
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 07:06:45 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e09a025277c: [flang][openacc] Fix clause restriction for host_data directive (authored by clementval).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95473/new/
https://reviews.llvm.org/D95473
Files:
flang/test/Semantics/OpenACC/acc-host-data.f90
llvm/include/llvm/Frontend/OpenACC/ACC.td
Index: llvm/include/llvm/Frontend/OpenACC/ACC.td
===================================================================
--- llvm/include/llvm/Frontend/OpenACC/ACC.td
+++ llvm/include/llvm/Frontend/OpenACC/ACC.td
@@ -506,7 +506,7 @@
// 2.8
def ACC_HostData : Directive<"host_data"> {
- let allowedClauses = [
+ let allowedOnceClauses = [
VersionedClause<ACCC_If>,
VersionedClause<ACCC_IfPresent>
];
Index: flang/test/Semantics/OpenACC/acc-host-data.f90
===================================================================
--- flang/test/Semantics/OpenACC/acc-host-data.f90
+++ flang/test/Semantics/OpenACC/acc-host-data.f90
@@ -27,9 +27,14 @@
!$acc host_data use_device(aa, bb) if_present
!$acc end host_data
+ !ERROR: At most one IF_PRESENT clause can appear on the HOST_DATA directive
+ !$acc host_data use_device(aa, bb) if_present if_present
+ !$acc end host_data
+
!$acc host_data use_device(aa, bb) if(.true.) if_present
!$acc end host_data
+ !ERROR: At most one IF clause can appear on the HOST_DATA directive
!$acc host_data use_device(aa, bb) if(.true.) if(ifCondition)
!$acc end host_data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95473.319564.patch
Type: text/x-patch
Size: 1141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210127/bd22c2f1/attachment.bin>
More information about the llvm-commits
mailing list