This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] Fix ICE with __auto_type (PR c/65228)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]