[C PATCH] Fix ICE with __auto_type (PR c/65228)
Joseph Myers
joseph@codesourcery.com
Fri Feb 27 13:11:00 GMT 2015
On Fri, 27 Feb 2015, Marek Polacek wrote:
> This PR points out that we can ICE in case we have __auto_type with undeclared
> variable: grokdeclarator returns error_mark_node, so check for that before
> accessing decl's TREE_CODE (can't use error_operand_p here as that would cause
> bogus diagnostics be emitted).
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk and 4.9?
>
> 2015-02-26 Marek Polacek <polacek@redhat.com>
>
> PR c/65228
> * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
>
> * gcc.dg/pr65228.c: New test.
OK.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list