Commit 2d48c13d by Jeff Law

expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF...

d
        * expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the
        offset's mode is not ptr_mode, convert it.

From-SVN: r17260
parent 0eb1ad44
......@@ -5739,6 +5739,14 @@ expand_expr (exp, target, tmode, modifier)
if (GET_CODE (op0) != MEM)
abort ();
if (GET_MODE (offset_rtx) != ptr_mode)
#ifdef POINTERS_EXTEND_UNSIGNED
offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 1);
#else
offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
#endif
op0 = change_address (op0, VOIDmode,
gen_rtx (PLUS, ptr_mode, XEXP (op0, 0),
force_reg (ptr_mode, offset_rtx)));
......
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