Commit f59700f9 by Richard Kenner Committed by Richard Kenner

expr.c (expand_expr, [...]): Put into memory if constant and…

expr.c (expand_expr, [...]): Put into memory if constant and EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER.

	* expr.c (expand_expr, case CONSTRUCTOR): Put into memory if
	constant and EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER.

From-SVN: r67098
parent 94e01adf
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
* c-decl.c (duplicate_decls): Test DECL for ERROR_MARK. * c-decl.c (duplicate_decls): Test DECL for ERROR_MARK.
* expr.c (expand_expr, case CONSTRUCTOR): Put into memory if
constant and EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER.
2003-05-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2003-05-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* m68hc11.c: Don't use the `0' flag for asm_fprintf specifiers. * m68hc11.c: Don't use the `0' flag for asm_fprintf specifiers.
......
...@@ -4982,7 +4982,7 @@ store_constructor (exp, target, cleared, size) ...@@ -4982,7 +4982,7 @@ store_constructor (exp, target, cleared, size)
{ {
rtx offset_rtx; rtx offset_rtx;
if (contains_placeholder_p (offset)) if (CONTAINS_PLACEHOLDER_P (offset))
offset = build (WITH_RECORD_EXPR, sizetype, offset = build (WITH_RECORD_EXPR, sizetype,
offset, make_tree (TREE_TYPE (exp), target)); offset, make_tree (TREE_TYPE (exp), target));
...@@ -5799,8 +5799,7 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode, ...@@ -5799,8 +5799,7 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
made during type construction. */ made during type construction. */
if (this_offset == 0) if (this_offset == 0)
break; break;
else if (! TREE_CONSTANT (this_offset) else if (CONTAINS_PLACEHOLDER_P (this_offset))
&& contains_placeholder_p (this_offset))
this_offset = build (WITH_RECORD_EXPR, sizetype, this_offset, exp); this_offset = build (WITH_RECORD_EXPR, sizetype, this_offset, exp);
offset = size_binop (PLUS_EXPR, offset, this_offset); offset = size_binop (PLUS_EXPR, offset, this_offset);
...@@ -5830,11 +5829,9 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode, ...@@ -5830,11 +5829,9 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
/* If the index has a self-referential type, pass it to a /* If the index has a self-referential type, pass it to a
WITH_RECORD_EXPR; if the component size is, pass our WITH_RECORD_EXPR; if the component size is, pass our
component to one. */ component to one. */
if (! TREE_CONSTANT (index) if (CONTAINS_PLACEHOLDER_P (index))
&& contains_placeholder_p (index))
index = build (WITH_RECORD_EXPR, TREE_TYPE (index), index, exp); index = build (WITH_RECORD_EXPR, TREE_TYPE (index), index, exp);
if (! TREE_CONSTANT (unit_size) if (CONTAINS_PLACEHOLDER_P (unit_size))
&& contains_placeholder_p (unit_size))
unit_size = build (WITH_RECORD_EXPR, sizetype, unit_size, array); unit_size = build (WITH_RECORD_EXPR, sizetype, unit_size, array);
offset = size_binop (PLUS_EXPR, offset, offset = size_binop (PLUS_EXPR, offset,
...@@ -7163,7 +7160,9 @@ expand_expr (exp, target, tmode, modifier) ...@@ -7163,7 +7160,9 @@ expand_expr (exp, target, tmode, modifier)
&& ((TREE_CODE (type) == VECTOR_TYPE && ((TREE_CODE (type) == VECTOR_TYPE
&& !is_zeros_p (exp)) && !is_zeros_p (exp))
|| ! mostly_zeros_p (exp))))) || ! mostly_zeros_p (exp)))))
|| (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp))) || ((modifier == EXPAND_INITIALIZER
|| modifier == EXPAND_CONST_ADDRESS)
&& TREE_CONSTANT (exp)))
{ {
rtx constructor = output_constant_def (exp, 1); rtx constructor = output_constant_def (exp, 1);
......
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