Commit 08203f73 by Marek Polacek Committed by Marek Polacek

re PR c/71426 (gcc ICE on x86_64-linux-gnu in get_parm_info, at c/c-decl.c:7059)

	PR c/71426
	* c-decl.c (get_parm_info): Don't crash on an assert on invalid
	code.

	* gcc.dg/noncompile/pr71426.c: New test.

From-SVN: r237196
parent 92a5f2ba
......@@ -3,6 +3,10 @@
PR c/71418
* c-decl.c (grokdeclarator): Check TYPE_P.
PR c/71426
* c-decl.c (get_parm_info): Don't crash on an assert on invalid
code.
2016-06-07 David Malcolm <dmalcolm@redhat.com>
* c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
......
......@@ -7054,9 +7054,9 @@ get_parm_info (bool ellipsis, tree expr)
break;
case FUNCTION_DECL:
/* FUNCTION_DECLs appear when there is an implicit function
declaration in the parameter list. */
gcc_assert (b->nested);
/* FUNCTION_DECLs appear when there is an implicit function
declaration in the parameter list. */
gcc_assert (b->nested || seen_error ());
goto set_shadowed;
case CONST_DECL:
......
......@@ -3,6 +3,9 @@
PR c/71418
* gcc.dg/noncompile/pr71418.c: New test.
PR c/71426
* gcc.dg/noncompile/pr71426.c: New test.
2016-06-07 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/ipa/inlinehint-4.c: Disable partial inlining.
......
/* PR c/71426 */
/* { dg-do compile } */
/* { dg-options "-w" } */
int f (int x[x - x ()]); /* { 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