Added support for Cilk Plus SIMD-enabled function for C.
[official-gcc.git] / gcc / testsuite / c-c++-common / cilk-plus / SE / ef_error.c
blob6a4b4a4178eb29258d7ac16bdf3110576d035446
1 /* { dg-do compile } */
2 /* { dg-options "-fcilkplus -fopenmp" } */
4 #pragma omp declare simd linear(y:1) simdlen(4)
5 __attribute__((vector (linear (y:1), vectorlength(4))))
6 int func (int x, int y) { /* { dg-error "cannot be used in the same function marked as a Cilk Plus SIMD-enabled" } */
7 return (x+y);
9 __attribute__((vector (linear (y:1), private (x)))) /* { dg-error "is not valid for" } */
10 int func2 (int x, int y) {
11 return (x+y);
14 __attribute__((vector (linear (y:1), simdlen (4)))) /* { dg-error "is not valid for" } */
15 int func2_1 (int x, int y) {
16 return (x+y);
19 __attribute__((vector (linear (y:1), inbranch))) /* { dg-error "is not valid for" } */
20 int func2_3 (int x, int y) {
21 return (x+y);
24 __attribute__((vector (notinbranch, vectorlength (4)))) /* { dg-error "is not valid for" } */
25 int func2_2 (int x, int y) {
26 return (x+y);
29 int main (void)
31 return (func (5,6));