comparison gcc/testsuite/c-c++-common/gomp/atomic-15.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-fopenmp" } */
3
4 int x = 6;
5
6 int
7 main ()
8 {
9 int v;
10 #pragma omp atomic
11 x = x * 7 + 6; /* { dg-error "expected|invalid form of" } */
12 #pragma omp atomic
13 x = x * 7 ^ 6; /* { dg-error "expected|invalid form of" } */
14 #pragma omp atomic update
15 x = x - 8 + 6; /* { dg-error "expected|invalid form of" } */
16 #pragma omp atomic
17 x = x ^ 7 | 2; /* { dg-error "expected|invalid form of" } */
18 #pragma omp atomic
19 x = x / 7 * 2; /* { dg-error "expected|invalid form of" } */
20 #pragma omp atomic
21 x = x / 7 / 2; /* { dg-error "expected|invalid form of" } */
22 #pragma omp atomic capture
23 { v = x; x = x * 7 + 6; } /* { dg-error "expected" "" { target c++ } } */
24 #pragma omp atomic capture
25 { v = x; x = x * 7 ^ 6; } /* { dg-error "expected" "" { target c++ } } */
26 #pragma omp atomic capture
27 { v = x; x = x - 8 + 6; } /* { dg-error "expected" "" { target c++ } } */
28 #pragma omp atomic capture
29 { v = x; x = x ^ 7 | 2; } /* { dg-error "expected" "" { target c++ } } */
30 #pragma omp atomic capture
31 { v = x; x = x / 7 * 2; } /* { dg-error "expected" "" { target c++ } } */
32 #pragma omp atomic capture
33 { v = x; x = x / 7 / 2; } /* { dg-error "expected" "" { target c++ } } */
34 #pragma omp atomic capture
35 { x = x * 7 + 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
36 #pragma omp atomic capture
37 { x = x * 7 ^ 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
38 #pragma omp atomic capture
39 { x = x - 8 + 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
40 #pragma omp atomic capture
41 { x = x ^ 7 | 2; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
42 (void) v;
43 return 0;
44 }