Commit 4e1bf5f5 by Per Bothner

varasm.c (output_constant): Strip NOP_EXPRs for SET_TYPE too, by using AGGREGATE_TYPE_P macro.

* varasm.c (output_constant):  Strip NOP_EXPRs for SET_TYPE too,
by using AGGREGATE_TYPE_P macro.

From-SVN: r8974
parent 4925e137
...@@ -3428,13 +3428,10 @@ output_constant (exp, size) ...@@ -3428,13 +3428,10 @@ output_constant (exp, size)
/* 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 off any 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. */ NOP_EXPR that converts between two record, union, array, or set 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 || AGGREGATE_TYPE_P (TREE_TYPE (exp))))
|| TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == QUAL_UNION_TYPE))
|| TREE_CODE (exp) == NON_LVALUE_EXPR) || TREE_CODE (exp) == NON_LVALUE_EXPR)
exp = TREE_OPERAND (exp, 0); exp = TREE_OPERAND (exp, 0);
......
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