Commit 97563bc8 by Igor Zamyatin Committed by Kirill Yukhin

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
parent edf6ddf6
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.
......
......@@ -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);
......
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.
......
/* 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" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment