aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c15
-rwxr-xr-xgcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c13
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c8
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c10
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc9
5 files changed, 53 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
new file mode 100644
index 000000000..83325a775
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
@@ -0,0 +1,15 @@
+/* PR middle-end/57541 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int foo1 ()
+{
+ int a;
+ a = __sec_reduce_add (1); /* { dg-error "Invalid builtin arguments" } */
+}
+
+int foo2 ()
+{
+ int a;
+ a = __sec_reduce_add (); /* { dg-error "Invalid builtin arguments" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
index 9bff07991..f379e461c 100755
--- a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
@@ -1,9 +1,10 @@
+/* PR middle-end/57541 */
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
int A[10];
-int main () {
+int foo () {
/* C compiler uses the term "undeclared" whereas C++ compiler uses
"not declared". Thus, grepping for declared seem to be the easiest. */
@@ -13,5 +14,13 @@ int main () {
A[l:s:c];
}
-/* { dg-message "note: each" "defined" { target c } 10 } */
+int foo1 (int N) {
+
+ char c = (char)N;
+ short s = (short)N;
+ A[l:s:c]; /* { dg-error "declared" } */
+}
+
+
+/* { dg-message "note: each" "defined" { target c } 11 } */
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c
new file mode 100644
index 000000000..87903af3c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c
@@ -0,0 +1,8 @@
+/* PR c/58942 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int foo (int*p, int i)
+{
+ return __sec_reduce_max_ind(p[1:i]);
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c
new file mode 100644
index 000000000..deb839218
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c
@@ -0,0 +1,10 @@
+/* PR c/61191 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+double f(double * A, double * B)
+{
+ return __sec_reduce_add((B[0:500])(; /* { dg-error "called object" "" { target c } } */
+/* { dg-error "expected expression before ';' token" "" { target c } 7 } */
+/* { dg-error "expected primary-expression before ';' token" "" { target c++ } 7 } */
+} /* { dg-error "expected" "" { target c } } */
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc
new file mode 100644
index 000000000..cf1caf12b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc
@@ -0,0 +1,9 @@
+/* PR c/60189 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ _Cilk_sync return; /* { dg-error " expected ';' before 'return'" } */
+ return 0;
+}