expr.c (expand_expr, [...]): If reg...
* expr.c (expand_expr, case COMPONENT_REF): If reg, copy OP0 to MEM both if OFFSET specified and if result BLKmode for ARRAY_RANGE_REF. From-SVN: r69308
This commit is contained in:
parent
1116457a0d
commit
8d2e5f7279
@ -1,3 +1,8 @@
|
|||||||
|
2003-07-13 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||||
|
|
||||||
|
* expr.c (expand_expr, case COMPONENT_REF): If reg, copy OP0 to MEM
|
||||||
|
both if OFFSET specified and if result BLKmode for ARRAY_RANGE_REF.
|
||||||
|
|
||||||
2003-07-13 Nathanael Nerode <neroden@gcc.gnu.org>
|
2003-07-13 Nathanael Nerode <neroden@gcc.gnu.org>
|
||||||
|
|
||||||
PR other/11123
|
PR other/11123
|
||||||
|
24
gcc/expr.c
24
gcc/expr.c
@ -7440,17 +7440,14 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode, enum expand_modifier
|
|||||||
op0 = validize_mem (force_const_mem (mode, op0));
|
op0 = validize_mem (force_const_mem (mode, op0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offset != 0)
|
/* Otherwise, if this object not in memory and we either have an
|
||||||
{
|
offset or a BLKmode result, put it there. This case can't occur in
|
||||||
rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode,
|
C, but can in Ada if we have unchecked conversion of an expression
|
||||||
EXPAND_SUM);
|
from a scalar type to an array or record type or for an
|
||||||
|
ARRAY_RANGE_REF whose type is BLKmode. */
|
||||||
/* If this object is in a register, put it into memory.
|
else if (GET_CODE (op0) != MEM
|
||||||
This case can't occur in C, but can in Ada if we have
|
&& (offset != 0
|
||||||
unchecked conversion of an expression from a scalar type to
|
|| (code == ARRAY_RANGE_REF && mode == BLKmode)))
|
||||||
an array or record type. */
|
|
||||||
if (GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
|
|
||||||
|| GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF)
|
|
||||||
{
|
{
|
||||||
/* If the operand is a SAVE_EXPR, we can deal with this by
|
/* If the operand is a SAVE_EXPR, we can deal with this by
|
||||||
forcing the SAVE_EXPR into memory. */
|
forcing the SAVE_EXPR into memory. */
|
||||||
@ -7473,6 +7470,11 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode, enum expand_modifier
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (offset != 0)
|
||||||
|
{
|
||||||
|
rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode,
|
||||||
|
EXPAND_SUM);
|
||||||
|
|
||||||
if (GET_CODE (op0) != MEM)
|
if (GET_CODE (op0) != MEM)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user