1 /* Test parsing of #pragma omp declare simd */
2 /* { dg-do compile } */
4 #pragma omp declare simd
5 int a
; /* { dg-error "not immediately followed by a function declaration or definition" } */
7 #pragma omp declare simd
8 int fn1 (int a
), fn2 (int a
); /* { dg-error "not immediately followed by a single function declaration or definition" } */
10 #pragma omp declare simd
11 int b
, fn3 (int a
); /* { dg-error "not immediately followed by a function declaration or definition" } */
13 #pragma omp declare simd linear (a)
14 int fn4 (int a
), c
; /* { dg-error "not immediately followed by a function declaration or definition" } */
18 #pragma omp declare simd
19 #pragma omp declare simd
20 #pragma omp threadprivate(t) /* { dg-error "must be followed by function declaration or definition or another" } */
23 #pragma omp declare simd inbranch notinbranch /* { dg-error "clause is incompatible with" } */
26 #pragma omp declare simd aligned (a, b)
27 int fn7 (int *a
, int b
[64]);
29 #pragma omp declare simd aligned (a) /* { dg-error "neither a pointer nor an array" } */
32 #pragma omp declare simd aligned (c) /* { dg-error "neither a pointer nor an array" } */
35 #pragma omp declare simd aligned (d) /* { dg-error "neither a pointer nor an array" } */
40 #pragma omp declare simd aligned (e) /* { dg-error "neither a pointer nor an array" } */
41 int fn11 (struct D e
);
43 #pragma omp declare simd linear(a:7) uniform(a) /* { dg-error "appears more than once" } */
45 #pragma omp declare simd linear(a) linear(a) /* { dg-error "appears more than once" } */
47 #pragma omp declare simd linear(a) linear(a:7) /* { dg-error "appears more than once" } */
49 #pragma omp declare simd linear(a:6) linear(a:6)/* { dg-error "appears more than once" } */
51 #pragma omp declare simd uniform(a) uniform(a) /* { dg-error "appears more than once" } */
53 #pragma omp declare simd uniform(a) aligned (a: 32)