PeixinQiao b826d551fc [NFC] Move flang OpenMP semantic tests under one single directory
To be consistent with OpenACC and will find the tests in one single
directory for OpenMP.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D127529
2022-06-11 10:46:42 +08:00

27 lines
968 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! This tests the various semantics related to the clauses of various OpenMP atomic constructs
program OmpAtomic
use omp_lib
integer :: g, x
!ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
!$omp atomic relaxed, seq_cst
x = x + 1
!ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
!$omp atomic read seq_cst, relaxed
x = g
!ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
!$omp atomic write relaxed, release
x = 2 * 4
!ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
!$omp atomic update release, seq_cst
x = 10
!ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
!$omp atomic capture release, seq_cst
x = g
g = x * 10
!$omp end atomic
end program OmpAtomic