aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/c-typeck.c10
-rw-r--r--gcc/fold-const.c2
-rw-r--r--gcc/stor-layout.c3
4 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6191b48..42838d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 73d98e9..3bab9ff 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -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)
{
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 327ebd3..ed353f8 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -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;
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 408846a..8707c8f 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -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