Debian Codegraph @

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

raw
1 module m
2 implicit none
3 integer i, v
4 real f
5 contains
6 subroutine foo (j)
7 integer, value :: j
8 !$omp atomic update,update ! { dg-error "Duplicated atomic clause: unexpected update clause" }
9 i = i + 1
10 !$omp atomic seq_cst release ! { dg-error "Duplicated memory-order clause: unexpected release clause" }
11 i = i + 1
12 !$omp atomic read,release ! { dg-error "ATOMIC READ at .1. incompatible with RELEASE clause" }
13 v = i
14 !$omp atomic acquire , write ! { dg-error "ATOMIC WRITE at .1. incompatible with ACQUIRE clause" }
15 i = v
16 !$omp atomic capture hint (0) capture ! { dg-error "Duplicated 'capture' clause" }
17 v = i = i + 1
18 !$omp atomic hint(j + 2) ! { dg-error "Value of HINT clause at .1. shall be a valid constant hint expression" }
19 i = i + 1
20 !$omp atomic hint(f)
21 ! { dg-error "HINT clause at .1. requires a scalar INTEGER expression" "" { target *-*-* } .-1 }
22 ! { dg-error "Value of HINT clause at .1. shall be a valid constant hint expression" "" { target *-*-* } .-2 }
23 i = i + 1
24 !$omp atomic foobar ! { dg-error "Failed to match clause" }
25 i = i + 1
26 end
27 end module