Commit 16214ee3 by Richard Kenner Committed by Richard Kenner

varasm.c (output_constant): Strip off a CONVERT_EXPR to a UNION_TYPE.

	* varasm.c (output_constant): Strip off a CONVERT_EXPR to
	a UNION_TYPE.

From-SVN: r32295
parent b099f07d
Thu Mar 2 17:27:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* varasm.c (output_constant): Strip off a CONVERT_EXPR to
a UNION_TYPE.
2000-03-02 Zack Weinberg <zack@wolery.cumb.org> 2000-03-02 Zack Weinberg <zack@wolery.cumb.org>
* cppfiles.c (cpp_read_file): New function. * cppfiles.c (cpp_read_file): New function.
......
...@@ -4207,12 +4207,18 @@ output_constant (exp, size) ...@@ -4207,12 +4207,18 @@ 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, array, or set types. */ NOP_EXPR that converts between two record, union, array, or set types
or a CONVERT_EXPR that converts to a union TYPE. */
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))
|| AGGREGATE_TYPE_P (TREE_TYPE (exp)))) || AGGREGATE_TYPE_P (TREE_TYPE (exp))))
|| (TREE_CODE (exp) == CONVERT_EXPR
&& code == UNION_TYPE)
|| TREE_CODE (exp) == NON_LVALUE_EXPR) || TREE_CODE (exp) == NON_LVALUE_EXPR)
exp = TREE_OPERAND (exp, 0); {
exp = TREE_OPERAND (exp, 0);
code = TREE_CODE (TREE_TYPE (exp));
}
/* Allow a constructor with no elements for any data type. /* Allow a constructor with no elements for any data type.
This means to fill the space with zeros. */ This means to fill the space with zeros. */
......
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