diff options
author | Valentin Clement <clementval@gmail.com> | 2021-01-06 14:15:07 -0500 |
---|---|---|
committer | clementval <clementval@gmail.com> | 2021-01-06 14:15:19 -0500 |
commit | 322e98bc279989a6fb7f181b6f6a2d9a6927dd67 (patch) | |
tree | c7962833c22cc1f0f3aa9addc145ed05c0512a3e /flang | |
parent | 7916fd71e9431829b22aed77711e11ea1dc225e3 (diff) | |
download | llvm-322e98bc279989a6fb7f181b6f6a2d9a6927dd67.zip llvm-322e98bc279989a6fb7f181b6f6a2d9a6927dd67.tar.gz llvm-322e98bc279989a6fb7f181b6f6a2d9a6927dd67.tar.bz2 |
[flang][openacc] Add more parsing/sema tests for init and shutdown directives
This patch adds some positive and failure tests for init and shutdown directives.
Reviewed By: kiranktp
Differential Revision: https://reviews.llvm.org/D90786
Diffstat (limited to 'flang')
-rw-r--r-- | flang/test/Semantics/acc-clause-validity.f90 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/flang/test/Semantics/acc-clause-validity.f90 b/flang/test/Semantics/acc-clause-validity.f90 index d410c5b..167051d 100644 --- a/flang/test/Semantics/acc-clause-validity.f90 +++ b/flang/test/Semantics/acc-clause-validity.f90 @@ -16,6 +16,8 @@ ! 2.11 Kernels Loop ! 2.11 Serial Loop ! 2.14.3 Set +! 2.14.1 Init +! 2.14.2 Shutdown ! 2.16.13 Wait program openacc_clause_validity @@ -267,6 +269,32 @@ program openacc_clause_validity !$acc set device_type(i) !$acc set device_type(2, i, j) !$acc set device_num(1) default_async(2) device_type(2, i, j) + !ERROR: At most one IF clause can appear on the INIT directive + !$acc init if(.TRUE.) if(ifCondition) + + !ERROR: At most one DEVICE_NUM clause can appear on the INIT directive + !$acc init device_num(1) device_num(i) + + !ERROR: At most one DEVICE_TYPE clause can appear on the INIT directive + !$acc init device_type(2) device_type(i, j) + + !$acc shutdown + !$acc shutdown if(.TRUE.) + !$acc shutdown if(ifCondition) + !$acc shutdown device_num(1) + !$acc shutdown device_num(i) + !$acc shutdown device_type(i) + !$acc shutdown device_type(2, i, j) + !$acc shutdown device_num(i) device_type(i, j) if(ifCondition) + + !ERROR: At most one IF clause can appear on the SHUTDOWN directive + !$acc shutdown if(.TRUE.) if(ifCondition) + + !ERROR: At most one DEVICE_NUM clause can appear on the SHUTDOWN directive + !$acc shutdown device_num(1) device_num(i) + + !ERROR: At most one DEVICE_TYPE clause can appear on the SHUTDOWN directive + !$acc shutdown device_type(2) device_type(i, j) !ERROR: At least one of ATTACH, COPYIN, CREATE clause must appear on the ENTER DATA directive !$acc enter data |