1! RUN: %python %S/../test_errors.py %s %flang -fopenacc 2 3! Check OpenACC clause validity for the following construct and directive: 4! 2.12 Atomic 5 6program openacc_atomic_validity 7 8 implicit none 9 10 integer :: i 11 integer, parameter :: N = 256 12 integer, dimension(N) :: c 13 14 15 !$acc parallel 16 !$acc atomic update 17 c(i) = c(i) + 1 18 19 !$acc atomic update 20 c(i) = c(i) + 1 21 !$acc end atomic 22 23 !$acc atomic write 24 c(i) = 10 25 26 !$acc atomic write 27 c(i) = 10 28 !$acc end atomic 29 30 !$acc atomic read 31 i = c(i) 32 33 !$acc atomic read 34 i = c(i) 35 !$acc end atomic 36 37 !$acc atomic capture 38 c(i) = i 39 i = i + 1 40 !$acc end atomic 41 42 !$acc atomic update 43 !ERROR: RHS of atomic update statement must be scalar 44 !ERROR: LHS of atomic update statement must be scalar 45 c = c + 1 46 47 !$acc end parallel 48 49end program openacc_atomic_validity 50