llvm-project/flang/test/Semantics/omp-atomic.f90

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
346 B
Fortran
Raw Normal View History

! RUN: %S/test_errors.sh %s %t %f18 -fopenmp
! Check OpenMP 2.13.6 atomic Construct
a = 1.0
!$omp parallel num_threads(4)
!$omp atomic seq_cst, read
b = a
!$omp atomic seq_cst write
a = b
!$omp end atomic
!$omp atomic capture seq_cst
b = a
a = a + 1
!$omp end atomic
!$omp atomic
a = a + 1
!$omp end parallel
end