Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/atomic-19.f90

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fdump-tree-original" }
3 ! { dg-final { scan-tree-dump-times "omp atomic release" 1 "original" } }
4 ! { dg-final { scan-tree-dump-times "omp atomic relaxed" 3 "original" } }
5 ! { dg-final { scan-tree-dump-times "omp atomic read relaxed" 1 "original" } }
6 ! { dg-final { scan-tree-dump-times "omp atomic capture relaxed" 1 "original" } }
7
8 module mod
9 implicit none
10 integer i, j, k, l, m, n
11
12 contains
13
14 subroutine foo ()
15 !$omp atomic release
16 i = i + 1;
17 end
18 end
19
20 module m2
21 use mod
22 implicit none
23 !$omp requires atomic_default_mem_order (relaxed)
24
25 contains
26 subroutine bar ()
27 integer v;
28 !$omp atomic
29 j = j + 1
30 !$omp atomic update
31 k = k + 1
32 !$omp atomic read
33 v = l
34 !$omp atomic write
35 m = v
36 !$omp atomic capture
37 n = n + 1; v = n
38 end
39 end module m2