2 /* { dg-do compile } */
3 /* { dg-additional-options "-std=c11" } */
8 _Atomic
int i
= 0, k
[4];
14 #pragma omp parallel reduction (+:i) /* { dg-error "'_Atomic' 'i' in 'reduction' clause" } */
16 #pragma omp declare reduction (foo: _Atomic int: omp_out += omp_in) initializer (omp_priv = omp_orig * 0) /* { dg-error "'_Atomic' qualified type in '#pragma omp declare reduction'" } */
17 #pragma omp declare reduction (bar: int: omp_out += omp_in) initializer (omp_priv = omp_orig * 0)
18 #pragma omp parallel reduction (bar:j)
20 #pragma omp parallel reduction (bar:i) /* { dg-error "'_Atomic' 'i' in 'reduction' clause" } */
22 #pragma omp parallel reduction (+:k) /* { dg-error "'_Atomic' 'k' in 'reduction' clause" } */
24 #pragma omp parallel reduction (+:k[1:2]) /* { dg-error "'_Atomic' \[^\n\r]* in 'reduction' clause" } */
31 #pragma omp simd aligned (p : 16) /* { dg-error "'_Atomic' 'p' in 'aligned' clause" } */
32 for (int i
= 0; i
< 16; i
++)
42 #pragma omp atomic write
43 x
= 6; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
44 #pragma omp atomic read
45 i
= x
; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
46 #pragma omp atomic update
47 x
+= 6; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
48 #pragma omp atomic capture
49 i
= x
*= 2; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
50 #pragma omp atomic write
51 p
[2] = 6; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
52 #pragma omp atomic read
53 i
= p
[2]; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
54 #pragma omp atomic update
55 p
[2] += 6; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
56 #pragma omp atomic capture
57 i
= p
[2] *= 2; /* { dg-error "'_Atomic' expression in '#pragma omp atomic'" } */
60 #pragma omp declare simd linear(x:1) /* { dg-error "'_Atomic' 'x' in 'linear' clause" } */
62 f4 (_Atomic
int x
, int y
)