public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, PR61191, Cilk+] Fix ICE on syntax error
@ 2014-05-20 14:32 Zamyatin, Igor
  2014-05-20 15:27 ` H.J. Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Zamyatin, Igor @ 2014-05-20 14:32 UTC (permalink / raw)
  To: GCC Patches (gcc-patches@gcc.gnu.org)

Hi all!

The following patch fixes the ICE for the cilk code with syntax error.

Regtested on x86_64.
Ok for trunk and 4.9?

Thanks,
Igor


gcc/c/ChangeLog:

2014-05-20  Igor Zamyatin  <igor.zamyatin@intel.com>

* c-array-notation.c (fix_builtin_array_notation_fn): Check invalid  
function parameters.


diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index 0ac6ba8..127f9a1 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);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-21 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-20 14:32 [PATCH, PR61191, Cilk+] Fix ICE on syntax error Zamyatin, Igor
2014-05-20 15:27 ` H.J. Lu
2014-05-20 16:36   ` Jeff Law
2014-05-21 12:49     ` Zamyatin, Igor
2014-05-21 13:05       ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).