2 integer (kind
= 4) :: a
, a2
3 integer (kind
= 2) :: b
, b2
5 double precision :: d
, d2
, c2
6 integer, dimension (10) :: e
9 !$omp atomic write seq_cst
11 !$omp atomic seq_cst, write
13 !$omp atomic write, seq_cst
15 !$omp atomic seq_cst write
17 !$omp atomic capture seq_cst
21 !$omp atomic capture, seq_cst
25 !$omp atomic seq_cst, capture
29 !$omp atomic seq_cst capture
33 if (a2
.ne
. 1 .or
. b2
.ne
. -16 .or
. c2
.ne
. 3 .or
. d2
.ne
. 2) STOP 1
34 !$omp atomic read seq_cst
36 !$omp atomic seq_cst, read
38 if (a2
.ne
. 5 .or
. b2
.ne
. -16 .or
. c2
.ne
. 6 .or
. d2
.ne
. 2) STOP 2
40 if (a2
.ne
. 10) STOP 3
43 a
= e(1) + e(6) + e(7) * 2
49 if (a2
.ne
. 28) STOP 5
50 !$omp atomic capture seq_cst
52 b
= e(1) + e(7) + e(5) * 2
54 if (b2
.ne
. -16) STOP 6
55 !$omp atomic seq_cst, read
58 if (b2
.ne
. 24) STOP 7