Debian Codegraph @

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

raw
1 ! PR middle-end/28046 for the original C tet.
2 ! { dg-do compile }
3 ! { dg-options "-fopenmp -fdump-tree-ompexp" }
4 ! { dg-require-effective-target cas_int }
5
6 module m
7 implicit none
8 integer a(3), b
9 type t_C
10 integer :: x, y
11 end type
12 type(t_C) :: c
13
14 interface
15 integer function bar(); end
16 integer function baz(); end
17 end interface
18 pointer :: baz
19 contains
20 subroutine foo
21 !$omp atomic
22 a(2) = a(2) + bar ()
23 !$omp atomic
24 b = b + bar ()
25 !$omp atomic
26 c%y = c%y + bar ()
27 !$omp atomic
28 b = b + baz ()
29 end
30 end module
31
32 ! { dg-final { scan-tree-dump-times "__atomic_fetch_add" 4 "ompexp" } }