[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenACC / acc-atomic-validity.f90
blobe6d82a77f6c1bc6403600127f3cf7fb684d5ba53
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenacc
3 ! Check OpenACC clause validity for the following construct and directive:
4 ! 2.12 Atomic
6 program openacc_atomic_validity
8 implicit none
10 integer :: i
11 integer, parameter :: N = 256
12 integer, dimension(N) :: c
14 !$acc parallel
15 !$acc atomic update
16 c(i) = c(i) + 1
18 !$acc atomic update
19 c(i) = c(i) + 1
20 !$acc end atomic
22 !$acc atomic write
23 c(i) = 10
25 !$acc atomic write
26 c(i) = 10
27 !$acc end atomic
29 !$acc atomic read
30 i = c(i)
32 !$acc atomic read
33 i = c(i)
34 !$acc end atomic
36 !$acc atomic capture
37 c(i) = i
38 i = i + 1
39 !$acc end atomic
40 !$acc end parallel
42 end program openacc_atomic_validity