aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c
new file mode 100644
index 000000000..1e5ca00a4
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c
@@ -0,0 +1,35 @@
+/* PR c/60197 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+extern int foo (void);
+
+int
+fn1 (void)
+{
+ int i;
+ i = (_Cilk_spawn foo ()) + 1; /* { dg-error "invalid use of" } */
+ return i;
+}
+
+int
+fn2 (void)
+{
+ int i = (_Cilk_spawn foo ()) + 1; /* { dg-error "invalid use of" } */
+ return i;
+}
+
+int
+fn3 (int j, int k, int l)
+{
+ int i = (((((_Cilk_spawn foo ()) + 1) - l) * k) / j); /* { dg-error "invalid use of" } */
+ return i;
+}
+
+int
+fn4 (int j, int k, int l)
+{
+ int i;
+ i = (((((_Cilk_spawn foo ()) + 1) - l) * k) / j); /* { dg-error "invalid use of" } */
+ return i;
+}