mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-24 07:24:02 +08:00
Handle ERROR_MARK input
From-SVN: r26848
This commit is contained in:
parent
418a84c257
commit
ea0f786baf
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
9
gcc/testsuite/gcc.dg/990506-0.c
Normal file
9
gcc/testsuite/gcc.dg/990506-0.c
Normal 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 } } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user