Commit e5165b60 by Marek Polacek Committed by Marek Polacek

re PR c/65228 (ICE: expected tree that contains ‘decl minimal’ structure, have…

re PR c/65228 (ICE: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in start_decl)

	PR c/65228
	* c-decl.c (start_decl): Return NULL_TREE if decl is an error node.

	* gcc.dg/pr65228.c: New test.

From-SVN: r221056
parent a2a5609b
2015-02-27 Marek Polacek <polacek@redhat.com>
PR c/65228
* c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2015-02-14 Marek Polacek <polacek@redhat.com> 2015-02-14 Marek Polacek <polacek@redhat.com>
PR c/64768 PR c/64768
......
...@@ -4460,8 +4460,8 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, ...@@ -4460,8 +4460,8 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
decl = grokdeclarator (declarator, declspecs, decl = grokdeclarator (declarator, declspecs,
NORMAL, initialized, NULL, &attributes, &expr, NULL, NORMAL, initialized, NULL, &attributes, &expr, NULL,
deprecated_state); deprecated_state);
if (!decl) if (!decl || decl == error_mark_node)
return 0; return NULL_TREE;
if (expr) if (expr)
add_stmt (fold_convert (void_type_node, expr)); add_stmt (fold_convert (void_type_node, expr));
......
2015-02-27 Marek Polacek <polacek@redhat.com>
PR c/65228
* gcc.dg/pr65228.c: New test.
2015-02-27 Kai Tietz <ktietz@redhat.com> 2015-02-27 Kai Tietz <ktietz@redhat.com>
PR c/35330 PR c/35330
......
/* PR c/65228 */
/* { dg-do compile } */
/* { dg-options "" } */
__auto_type a = b; /* { dg-error "undeclared" } */
void
f (void)
{
__auto_type c = d; /* { dg-error "undeclared" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment