Handle ERROR_MARK input

From-SVN: r26848
This commit is contained in:
Craig Burley 1999-05-09 19:56:58 +00:00 committed by Craig Burley
parent 418a84c257
commit ea0f786baf
4 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Sun May 9 22:51:04 1999 Craig Burley <craig@jcb-sc.com>
Fix gcc.dg/990506-0.c:
* c-typeck.c (require_complete_type): Handle ERROR_MARK input.
Sun May 9 13:19:12 1999 Jeffrey A Law (law@cygnus.com)
* gcse.c (cprop_insn): Do not try to simplify a simple jump.

View File

@ -83,6 +83,9 @@ require_complete_type (value)
{
tree type = TREE_TYPE (value);
if (TREE_CODE (value) == ERROR_MARK)
return error_mark_node;
/* First, detect a valid value with a complete type. */
if (TYPE_SIZE (type) != 0
&& type != void_type_node)

View File

@ -1,3 +1,7 @@
1999-05-08 Craig Burley <craig@jcb-sc.com>
* gcc.dg/990506-0.c: New test.
1999-05-08 Richard Henderson <rth@cygnus.com>
* g++.old-deja/g++.benjamin/p12475.C: Use LONG_MAX to find

View File

@ -0,0 +1,9 @@
/* Verify that a diagnostic is issued without crashing due to
--enable-checking catching a bug in the C front end. */
/* { dg-do compile } */
x()
{
foo (i);
/* { dg-error "undeclared" "undeclared-variable message" { target native } { 6 } } */
/* { dg-error "function it appears in" "reminder message" { target native } { 6 } } */
}