re PR c/61191 (cilkplus ICE on syntax error)

gcc/c/
	PR c/61191
	* c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
	function parameters.

gcc/testsuite/
	PR c/61191
	* c-c++-common/cilk-plus/AN/pr61191.c: Check for correct handling of
	the case with syntax error.

From-SVN: r210930
This commit is contained in:
Igor Zamyatin 2014-05-26 10:04:01 +00:00 committed by Kirill Yukhin
parent edf6ddf677
commit 97563bc895
4 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/61191
* c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
function parameters.
2014-05-23 Jan Hubicka <hubicka@ucw.cz>
* c-decl.c (merge_decls): Preserve symtab node pointers.

View File

@ -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);

View File

@ -1,3 +1,9 @@
2014-05-26 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.
2014-05-26 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* gcc.dg/lto/pr61278_0.c: New test.

View File

@ -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" } */