tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / requires-11.f90
blobc55009d5d263d7215224175d847969b42a1b94d0
1 function foo (x, y) result (z)
2 !$omp requires atomic_default_mem_order(release)
3 implicit none
4 real :: x, y, z
6 !$omp atomic write
7 x = y
9 !$omp atomic update
10 x = x + 1
12 !$omp atomic read ! { dg-error "!.OMP ATOMIC READ at .1. incompatible with RELEASE clause implicitly provided by a REQUIRES directive" }
13 z = x
14 end
16 function bar (a, b) result (c)
17 !$omp requires atomic_default_mem_order(acquire)
18 implicit none
19 real :: a, b, c
21 !$omp atomic write ! { dg-error "!.OMP ATOMIC WRITE at .1. incompatible with ACQUIRES clause implicitly provided by a REQUIRES directive" }
22 a = b
24 !$omp atomic update
25 a = a + 1
27 !$omp atomic read
28 c = a
29 end