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
This commit is contained in:
Jeff Law 1997-12-29 06:15:21 -07:00
parent 0eb1ad44b6
commit 2d48c13dc2
1 changed files with 8 additions and 0 deletions

View File

@ -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)));