aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
new file mode 100644
index 000000000..5312992ff
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -fopenmp-simd" } */
+
+#pragma omp declare simd linear(y:1) simdlen(4)
+__attribute__((vector (linear (y:1), vectorlength(4))))
+int func (int x, int y) { /* { dg-error "cannot be used in the same function marked as a Cilk Plus SIMD-enabled" } */
+ return (x+y);
+}
+__attribute__((vector (linear (y:1), private (x)))) /* { dg-error "is not valid for" } */
+int func2 (int x, int y) {
+ return (x+y);
+}
+
+__attribute__((vector (linear (y:1), simdlen (4)))) /* { dg-error "is not valid for" } */
+int func2_1 (int x, int y) {
+ return (x+y);
+}
+
+__attribute__((vector (linear (y:1), inbranch))) /* { dg-error "is not valid for" } */
+int func2_3 (int x, int y) {
+ return (x+y);
+}
+
+__attribute__((vector (notinbranch, vectorlength (4)))) /* { dg-error "is not valid for" } */
+int func2_2 (int x, int y) {
+ return (x+y);
+}
+
+int main (void)
+{
+ return (func (5,6));
+}