diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c new file mode 100644 index 00000000000..ac11b9209b1 --- /dev/null +++ b/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" } */ +} |