diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-27 07:37:16 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-27 07:37:16 +0000 |
commit | 6a4737bfbaec167003782b65202c5f1ad0168885 (patch) | |
tree | 9d5ad76f03785899d1c5d7e1c1498db8fe89be95 /gcc | |
parent | d2b58526777740cbb026d12aa7c3ea96e0601e0b (diff) | |
download | gcc-6a4737bfbaec167003782b65202c5f1ad0168885.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/c-typeck.c | 10 | ||||
-rw-r--r-- | gcc/fold-const.c | 2 | ||||
-rw-r--r-- | gcc/stor-layout.c | 3 |
4 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6191b48cee7..42838d8d509 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 73d98e96419..3bab9ff16b8 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 327ebd36a79..ed353f89627 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 408846ae989..8707c8fac86 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 |