Debian Codegraph @

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

raw
1 ! { dg-do compile }
2
3 subroutine bar
4 integer :: i, v
5 real :: f
6 !$omp atomic update acq_rel hint("abc")
7 ! { dg-error "HINT clause at .1. requires a scalar INTEGER expression" "" { target *-*-* } .-1 }
8 ! { dg-error "Value of HINT clause at .1. shall be a valid constant hint expression" "" { target *-*-* } .-2 }
9 i = i + 1
10 !$omp end atomic
11
12 !$omp atomic acq_rel
13 i = i + 1
14 !$omp end atomic
15
16 !$omp atomic capture,acq_rel , hint (1)
17 i = i + 1
18 v = i
19 !$omp end atomic
20
21 !$omp atomic acq_rel , hint (1), update
22 i = i + 1
23 !$omp end atomic
24
25 !$omp atomic hint(0),acquire capture
26 i = i + 1
27 v = i
28 !$omp end atomic
29
30 !$omp atomic write capture ! { dg-error "with CAPTURE clause is incompatible with READ or WRITE" }
31 i = 2
32 v = i
33 !$omp end atomic
34
35 !$omp atomic foobar ! { dg-error "Failed to match clause" }
36 end