]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c/61191 (cilkplus ICE on syntax error)
authorIgor Zamyatin <igor.zamyatin@intel.com>
Mon, 26 May 2014 10:04:01 +0000 (10:04 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Mon, 26 May 2014 10:04:01 +0000 (10:04 +0000)
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

gcc/c/ChangeLog
gcc/c/c-array-notation.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c [new file with mode: 0644]

index dc4a653d50877f04b2616383d7a07653e6f829b2..9c35867de5f51a54d49a9d47d221ea9799a6b622 100644 (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.
index a01269742ce1c3c49600f0a8b6d47ec19fefd3f0..a0fe2fbbee8d362f913d11867881f3b66526deb9 100644 (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);
   
index 810cc44a87cce1479152993e4fd8b055d26e2c70..c2c2f6a363f7d48f9cd0ac781d8195c3341c8aa9 100644 (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.
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 (file)
index 0000000..e27819b
--- /dev/null
@@ -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" } */
This page took 0.099333 seconds and 5 git commands to generate.