re PR c/18809 (ICE after a couple of errors with a simple invalid C code)

PR c/18809
	* c-typeck.c (convert_arguments): Check for error_mark_node.

	* gcc.dg/pr18809-1.c: New test.

From-SVN: r94049
This commit is contained in:
Volker Reichelt 2005-01-22 00:12:27 +00:00 committed by Volker Reichelt
parent 15c8b2d40a
commit 209136895d
4 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-01-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/18809
* c-typeck.c (convert_arguments): Check for error_mark_node.
2005-01-20 Ian Lance Taylor <ian@airs.com>
PR tree-optimization/13000

View file

@ -2067,7 +2067,7 @@ convert_arguments (tree typelist, tree values, tree function, tree fundecl)
/* Formal parm type is specified by a function prototype. */
tree parmval;
if (!COMPLETE_TYPE_P (type))
if (type == error_mark_node || !COMPLETE_TYPE_P (type))
{
error ("type of formal parameter %d is incomplete", parmnum + 1);
parmval = val;

View file

@ -1,3 +1,8 @@
2005-01-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/18809
* gcc.dg/pr18809-1.c: New test.
2005-01-21 Ian Lance Taylor <ian@airs.com>
* gcc.dg/20050121-1.c: New test.

View file

@ -0,0 +1,7 @@
/* PR c/18809 */
/* Origin: Andrew Pinski <pinskia@gcc.gnu.org> */
/* { dg-do compile } */
void foo(enum E e) {} /* { dg-error "" } */
void bar() { foo(0); } /* { dg-error "formal" } */