c-typeck.c (c_expand_start_case): Return immediately if exp is an ERROR_MARK.

1999-08-27 00:27 -0700  Zack Weinberg  <zack@bitmover.com>

	* c-typeck.c (c_expand_start_case): Return immediately if exp
	is an ERROR_MARK.
	* fold-const.c (operand_equal_p): Return immediately if arg1
	or arg0 are ERROR_MARKs.
	* stor-layout.c (layout_type [case RECORD_TYPE]): Ignore
	fields of type ERROR_MARK when calculating if the record can
	go in a register.

From-SVN: r28923
This commit is contained in:
Zack Weinberg 1999-08-27 07:37:16 +00:00 committed by Zack Weinberg
parent 2dc36fe3a7
commit e89a9554e3
4 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,13 @@
1999-08-27 00:27 -0700 Zack Weinberg <zack@bitmover.com>
* c-typeck.c (c_expand_start_case): Return immediately if exp
is an ERROR_MARK.
* fold-const.c (operand_equal_p): Return immediately if arg1
or arg0 are ERROR_MARKs.
* stor-layout.c (layout_type [case RECORD_TYPE]): Ignore
fields of type ERROR_MARK when calculating if the record can
go in a register.
Fri Aug 27 01:03:48 1999 Jim Kingdon <http://developer.redhat.com>
with much help from Jeffrey A Law and Richard Henderson

View File

@ -6706,8 +6706,14 @@ tree
c_expand_start_case (exp)
tree exp;
{
register enum tree_code code = TREE_CODE (TREE_TYPE (exp));
tree type = TREE_TYPE (exp);
register enum tree_code code;
tree type;
if (TREE_CODE (exp) == ERROR_MARK)
return exp;
code = TREE_CODE (TREE_TYPE (exp));
type = TREE_TYPE (exp);
if (code != INTEGER_TYPE && code != ENUMERAL_TYPE && code != ERROR_MARK)
{

View File

@ -2091,6 +2091,8 @@ operand_equal_p (arg0, arg1, only_const)
if (TREE_CODE (arg0) != TREE_CODE (arg1)
/* This is needed for conversions and for COMPONENT_REF.
Might as well play it safe and always test this. */
|| TREE_CODE (TREE_TYPE (arg0)) == ERROR_MARK
|| TREE_CODE (TREE_TYPE (arg1)) == ERROR_MARK
|| TYPE_MODE (TREE_TYPE (arg0)) != TYPE_MODE (TREE_TYPE (arg1)))
return 0;

View File

@ -936,7 +936,8 @@ layout_type (type)
{
int bitpos;
if (TREE_CODE (field) != FIELD_DECL)
if (TREE_CODE (field) != FIELD_DECL
|| TREE_CODE (TREE_TYPE (field)) == ERROR_MARK)
continue;
if (TYPE_MODE (TREE_TYPE (field)) == BLKmode