aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c
new file mode 100644
index 000000000..ac11b9209
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+/* Test-case contains no array notation but is compiled with -fcilkplus.
+ It will still print the too few arguments func, thereby saying the
+ if-statement after the for-loop to check for !flag_enable_cilkplus ||
+ !is_cilkplus_reduce_function (fundecl) is not valid is always taken. */
+
+int func (int, int); /* { dg-message "declared here" } */
+
+int main (void)
+{
+ int a = 5, b = 2;
+ return func (a); /* { dg-error "too few arguments to function" } */
+}