diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c new file mode 100644 index 000000000..9aa4a6829 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fcilkplus" } */ + +volatile int *a, *b, N; +typedef int tint; +struct someclass { + int a; + char b; + int *p; +}; + +void foo() +{ +#pragma simd vectorlength(4) vectorlength(8) /* { dg-error "too many 'vectorlength' clauses" } */ + for (int i=0; i < N; ++i) + a[i] = b[i]; + +#pragma simd vectorlength(3) /* { dg-error "must be a power of 2" } */ + for (int i=0; i < N; ++i) + a[i] = b[i]; +} |