Message ID | 0EFAB2BDD0F67E4FB6CCC8B9F87D7569564401E1@IRSMSX101.ger.corp.intel.com |
---|---|
State | New |
Headers | show |
On 05/21/14 06:48, Zamyatin, Igor wrote: > Please see the patch with the testcase > > Thanks, > Igor > > gcc/c/ChangeLog: > > 2014-05-20 Igor Zamyatin <igor.zamyatin@intel.com> > > PR c/61191 > * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid > function parameters. > > gcc/testsuite/ChangeLog > > 2014-05-20 Igor Zamyatin <igor.zamyatin@intel.com> > > PR c/61191 > * c-c++-common/cilk-plus/AN/pr61191.c: Check for correct > handling of the case with syntax error. This is fine. Please install. Thanks, Jeff
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c index 0ac6ba8..127f9a1 100644 --- a/gcc/c/c-array-notation.c +++ b/gcc/c/c-array-notation.c @@ -229,6 +229,8 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var) /* Fully fold any EXCESSIVE_PRECISION EXPR that can occur in the function parameter. */ func_parm = c_fully_fold (func_parm, false, NULL); + if (func_parm == error_mark_node) + return error_mark_node; location = EXPR_LOCATION (an_builtin_fn); diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c new file mode 100644 index 0000000..e27819b --- /dev/null +++ b/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 "expected expression before ';' token" "" {target *-*-*} 7 } */ +/* { dg-error "called object" "" {target *-*-*} 7 } */ +} /* { dg-error "expected" } */