[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / OpenACC / acc-atomic-validity.f90
blob8ebac44bcca370f39a341c4ac8a86581d872384b
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.12 Atomic
7 program openacc_atomic_validity
9 implicit none
11 integer :: i
12 integer, parameter :: N = 256
13 integer, dimension(N) :: c
15 !$acc parallel
16 !$acc atomic update
17 c(i) = c(i) + 1
19 !$acc atomic update
20 c(i) = c(i) + 1
21 !$acc end atomic
23 !$acc atomic write
24 c(i) = 10
26 !$acc atomic write
27 c(i) = 10
28 !$acc end atomic
30 !$acc atomic read
31 i = c(i)
33 !$acc atomic read
34 i = c(i)
35 !$acc end atomic
37 !$acc atomic capture
38 c(i) = i
39 i = i + 1
40 !$acc end atomic
41 !$acc end parallel
43 end program openacc_atomic_validity