[flang-commits] [flang] 553e364 - [flang][openacc] Add clause validity tests for the host_data directive

via flang-commits flang-commits at lists.llvm.org
Fri Nov 20 17:17:45 PST 2020


Author: Valentin Clement
Date: 2020-11-20T20:17:37-05:00
New Revision: 553e364194ac50eee56bcb31bb25f033527605b8

URL: https://github.com/llvm/llvm-project/commit/553e364194ac50eee56bcb31bb25f033527605b8
DIFF: https://github.com/llvm/llvm-project/commit/553e364194ac50eee56bcb31bb25f033527605b8.diff

LOG: [flang][openacc] Add clause validity tests for the host_data directive

Add some clause validity tests for the host_data directive to avoid future regressions.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D91889

Added: 
    

Modified: 
    flang/test/Semantics/acc-clause-validity.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Semantics/acc-clause-validity.f90 b/flang/test/Semantics/acc-clause-validity.f90
index 7b3a56ebe25e..da053d5fdeab 100644
--- a/flang/test/Semantics/acc-clause-validity.f90
+++ b/flang/test/Semantics/acc-clause-validity.f90
@@ -101,6 +101,21 @@ program openacc_clause_validity
   !$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
 


        


More information about the flang-commits mailing list