aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorIgor Zamyatin <igor.zamyatin@intel.com>2014-05-26 10:04:01 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-05-26 10:04:01 +0000
commit97563bc895f753bab46f97c1843167faae1a6c06 (patch)
tree332189b6aa01d5e1346db407082176c668b2dd58 /gcc/c
parentedf6ddf6775b07472f2dbaeb3b9511fd2ab0e902 (diff)
downloadgcc-97563bc895f753bab46f97c1843167faae1a6c06.zip
gcc-97563bc895f753bab46f97c1843167faae1a6c06.tar.gz
gcc-97563bc895f753bab46f97c1843167faae1a6c06.tar.bz2
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
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-array-notation.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index dc4a653..9c35867 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -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.
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index a012697..a0fe2fb 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);