[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-atomic05.f90
blob70492675e61e182d1a477f4cef201944ed35fb87
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! This tests the various semantics related to the clauses of various OpenMP atomic constructs
5 program OmpAtomic
6 use omp_lib
7 integer :: g, x
9 !ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
10 !$omp atomic relaxed, seq_cst
11 x = x + 1
12 !ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
13 !$omp atomic read seq_cst, relaxed
14 x = g
15 !ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
16 !$omp atomic write relaxed, release
17 x = 2 * 4
18 !ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
19 !$omp atomic update release, seq_cst
20 x = 10
21 !ERROR: More than one memory order clause not allowed on OpenMP Atomic construct
22 !$omp atomic capture release, seq_cst
23 x = g
24 g = x * 10
25 !$omp end atomic
26 end program OmpAtomic