[PATCH] D91889: [flang][openacc] Add clause validity tests for the host_data directive
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 12:49:53 PST 2020
clementval created this revision.
clementval added reviewers: kiranchandramohan, kiranktp, sscalpone, sameeranjoshi, SouraVX, tskeith, klausler.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
clementval requested review of this revision.
Add some clause validity tests for the host_data directive to avoid future regressions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91889
Files:
flang/test/Semantics/acc-clause-validity.f90
Index: flang/test/Semantics/acc-clause-validity.f90
===================================================================
--- flang/test/Semantics/acc-clause-validity.f90
+++ flang/test/Semantics/acc-clause-validity.f90
@@ -27,7 +27,7 @@
logical, dimension(N) :: d, e
real :: reduction_r
logical :: reduction_l
- real(8), dimension(N, N) :: aa
+ real(8), dimension(N, N) :: aa, bb
logical :: ifCondition = .TRUE.
!ERROR: At least one clause is required on the DECLARE directive
@@ -99,6 +99,21 @@
!$acc host_data
!$acc end host_data
+ !$acc host_data use_device(aa)
+ !$acc end host_data
+
+ !$acc host_data use_device(aa) if(.true.)
+ !$acc end host_data
+
+ !$acc host_data use_device(aa) if(ifCondition)
+ !$acc end host_data
+
+ !$acc host_data use_device(aa, bb) if_present
+ !$acc end host_data
+
+ !$acc host_data use_device(aa, bb) if(.true.) if_present
+ !$acc end host_data
+
!ERROR: At least one of DEFAULT_ASYNC, DEVICE_NUM, DEVICE_TYPE clause must appear on the SET directive
!$acc set
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91889.306767.patch
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201120/0f7bddce/attachment.bin>
More information about the llvm-commits
mailing list