Commit b81cdf54 by Richard Kenner

(output_constant): When eliminating conversions, treat ARRAY_TYPE like

a record.

From-SVN: r8546
parent ac7400c6
...@@ -3390,10 +3390,11 @@ output_constant (exp, size) ...@@ -3390,10 +3390,11 @@ output_constant (exp, size)
return; return;
/* Eliminate the NON_LVALUE_EXPR_EXPR that makes a cast not be an lvalue. /* 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 That way we get the constant (we hope) inside it. Also, strip off any
off any NOP_EXPR that converts between two record or union types. */ NOP_EXPR that converts between two record, union, or array types. */
while ((TREE_CODE (exp) == NOP_EXPR while ((TREE_CODE (exp) == NOP_EXPR
&& (TREE_TYPE (exp) == TREE_TYPE (TREE_OPERAND (exp, 0)) && (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)) == RECORD_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE || TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == QUAL_UNION_TYPE)) || TREE_CODE (TREE_TYPE (exp)) == QUAL_UNION_TYPE))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment