diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-11-21 22:21:24 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-11-21 22:21:24 -0500 |
commit | b81cdf54f6edbeff6b0f1349c9c11333344bc73e (patch) | |
tree | 48f062b221b2a8e351bd9ffa3e539710d8aede99 | |
parent | ac7400c632c4fc3da45180958f693bb69acc24bd (diff) | |
download | gcc-b81cdf54f6edbeff6b0f1349c9c11333344bc73e.zip gcc-b81cdf54f6edbeff6b0f1349c9c11333344bc73e.tar.gz gcc-b81cdf54f6edbeff6b0f1349c9c11333344bc73e.tar.bz2 |
(output_constant): When eliminating conversions, treat ARRAY_TYPE like
a record.
From-SVN: r8546
-rw-r--r-- | gcc/varasm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 28165a5..d0733d3 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3390,10 +3390,11 @@ output_constant (exp, size) return; /* Eliminate the NON_LVALUE_EXPR_EXPR that makes a cast not be an lvalue. - That way we get the constant (we hope) inside it. Also, strip - off any NOP_EXPR that converts between two record or union types. */ + That way we get the constant (we hope) inside it. Also, strip off any + NOP_EXPR that converts between two record, union, or array types. */ while ((TREE_CODE (exp) == NOP_EXPR && (TREE_TYPE (exp) == TREE_TYPE (TREE_OPERAND (exp, 0)) + || TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE || TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE || TREE_CODE (TREE_TYPE (exp)) == QUAL_UNION_TYPE)) |