Files
clang-p2996/flang/test/Semantics/OpenACC/acc-wait-validity.f90
Ivan Zhechev 6c1ac141d3 [Flang] Ported test_errors.sh to Python
To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script.

Used python regex in place of awk/sed.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D107575
2021-09-06 08:19:42 +00:00

43 lines
875 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenacc
! Check OpenACC clause validity for the following construct and directive:
! 2.16.13 Wait
program openacc_wait_validity
implicit none
logical :: ifCondition = .TRUE.
!$acc wait
!$acc wait async
!$acc wait(1)
!$acc wait(1, 2)
!$acc wait(queues: 1)
!$acc wait(queues: 1, 2)
!$acc wait(devnum: 1: 3)
!$acc wait(devnum: 1: 3, 4)
!$acc wait(devnum: 1: queues: 3)
!$acc wait(devnum: 1: queues: 3, 4)
!$acc wait(1) if(.true.)
!ERROR: At most one IF clause can appear on the WAIT directive
!$acc wait(1) if(.true.) if(.false.)
!$acc wait(1) if(.true.) async
!$acc wait(1) if(ifCondition) async
!$acc wait(1) if(.true.) async(1)
!ERROR: At most one ASYNC clause can appear on the WAIT directive
!$acc wait(1) if(.true.) async(1) async
end program openacc_wait_validity