Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/flush-1.f90

raw
1 ! { dg-additional-options "-fdump-tree-gimple" }
2 ! { dg-final { scan-tree-dump "foo \\(6\\);\[\n\r]* __sync_synchronize \\(\\);\[\n\r]* foo \\(6\\);" "gimple" } }
3 ! { dg-final { scan-tree-dump "foo \\(4\\);\[\n\r]* __atomic_thread_fence \\(4\\);\[\n\r]* foo \\(4\\);" "gimple" } }
4 ! { dg-final { scan-tree-dump "foo \\(3\\);\[\n\r]* __atomic_thread_fence \\(3\\);\[\n\r]* foo \\(3\\);" "gimple" } }
5 ! { dg-final { scan-tree-dump "foo \\(2\\);\[\n\r]* __atomic_thread_fence \\(2\\);\[\n\r]* foo \\(2\\);" "gimple" } }
6 ! { dg-final { scan-tree-dump "foo \\(5\\);\[\n\r]* __sync_synchronize \\(\\);\[\n\r]* foo \\(5\\);" "gimple" } }
7
8 module m
9 interface
10 subroutine foo(x)
11 integer, value :: x
12 end
13 end interface
14 end module m
15
16 subroutine f1
17 use m
18 call foo (4)
19 !$omp flush acq_rel
20 call foo (4)
21 end
22
23 subroutine f2
24 use m
25 call foo (3)
26 !$omp flush release
27 call foo (3)
28 end
29
30 subroutine f3
31 use m
32 call foo (2)
33 !$omp flush acquire
34 call foo (2)
35 end
36
37 subroutine f4
38 use m
39 call foo (5)
40 !$omp flush
41 call foo (5)
42 end
43
44 subroutine f5
45 use m
46 call foo (6)
47 !$omp flush seq_cst
48 call foo (6)
49 end