[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / OpenACC / acc-wait-validity.f90
blobc33bcbdecadca1cbe83b9763affea4dd70650807
1 ! RUN: %S/../test_errors.sh %s %t %flang -fopenacc
2 ! REQUIRES: shell
4 ! Check OpenACC clause validity for the following construct and directive:
5 ! 2.16.13 Wait
7 program openacc_wait_validity
9 implicit none
11 logical :: ifCondition = .TRUE.
13 !$acc wait
15 !$acc wait async
17 !$acc wait(1)
18 !$acc wait(1, 2)
20 !$acc wait(queues: 1)
21 !$acc wait(queues: 1, 2)
23 !$acc wait(devnum: 1: 3)
24 !$acc wait(devnum: 1: 3, 4)
26 !$acc wait(devnum: 1: queues: 3)
27 !$acc wait(devnum: 1: queues: 3, 4)
29 !$acc wait(1) if(.true.)
31 !ERROR: At most one IF clause can appear on the WAIT directive
32 !$acc wait(1) if(.true.) if(.false.)
34 !$acc wait(1) if(.true.) async
36 !$acc wait(1) if(ifCondition) async
38 !$acc wait(1) if(.true.) async(1)
40 !ERROR: At most one ASYNC clause can appear on the WAIT directive
41 !$acc wait(1) if(.true.) async(1) async
43 end program openacc_wait_validity