1! { dg-do compile }
2subroutine test_atomic
3    integer (kind = 4) :: a
4    integer :: b
5    real :: c, f
6    double precision :: d
7    integer, dimension (10) :: e
8    a = 1
9    b = 2
10    c = 3
11    d = 4
12    e = 5
13    f = 6
14!$omp atomic
15    a = a + 4
16!$omp atomic
17    b = 4 - b
18!$omp atomic
19    c = c * 2
20!$omp atomic
21    d = 2 / d
22!$omp atomic
23    e = 1 ! { dg-error "must set a scalar variable" }
24!$omp atomic
25    a = a ** 8 ! { dg-error "assignment operator must be" }
26!$omp atomic
27    b = b + 3 + b ! { dg-error "cannot reference" }
28!$omp atomic
29    c = c - f + 1 ! { dg-error "not mathematically equivalent to" }
30!$omp atomic
31    a = ishft (a, 1) ! { dg-error "assignment intrinsic must be" }
32!$omp atomic
33    c = min (c, 2.1, c) ! { dg-error "intrinsic arguments except one" }
34!$omp atomic
35    a = max (b, e(1)) ! { dg-error "intrinsic argument must be 'a'" }
36!$omp atomic
37    d = 12 ! { dg-error "assignment must have an operator" }
38end subroutine test_atomic
39