aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-array-notation.c2
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c10
4 files changed, 24 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);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 810cc44..c2c2f6a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
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" } */