Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/atomic.f90

raw
1 ! { dg-do compile }
2
3 subroutine foo
4 integer :: i, v
5 !$acc atomic read bar ! { dg-error "21: Unexpected junk after !.ACC ATOMIC statement" }
6 i = v
7
8 !$acc atomic read write ! { dg-error "21: Unexpected junk after !.ACC ATOMIC statement" }
9 i = v
10
11 !$acc atomic read seq_cst ! { dg-error "21: Unexpected junk after !.ACC ATOMIC statement" }
12 i = v
13
14 !$acc atomic read relaxed ! { dg-error "21: Unexpected junk after !.ACC ATOMIC statement" }
15 i = v
16
17 !$acc atomic update hint(1) ! { dg-error "23: Unexpected junk after !.ACC ATOMIC statement" }
18 i = i + 1
19
20 !$acc atomic update update capture ! { dg-error "23: Unexpected junk after !.ACC ATOMIC statement" }
21 i = i + 1
22 v = i
23
24 !$acc atomic update capture capture ! { dg-error "23: Unexpected junk after !.ACC ATOMIC statement" }
25 i = i + 1
26 v = i
27
28 !$acc atomic write capture ! { dg-error "22: Unexpected junk after !.ACC ATOMIC statement" }
29 i = 1
30
31 ! Valid in C/C++ since OpenACC 2.5 but not in Fortran:
32 !$acc atomic update capture ! { dg-error "23: Unexpected junk after !.ACC ATOMIC statement" }
33 i = i + 1
34 v = i
35 end