diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-12-29 06:15:21 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-29 06:15:21 -0700 |
commit | 2d48c13dc2d0912138ff2648ce9c1081d1653b73 (patch) | |
tree | 351e54fd6d54867ace95ef13cb947ef619198be4 /gcc | |
parent | 0eb1ad44b61e10b527b86be59e97cfc59b9a72df (diff) | |
download | gcc-2d48c13dc2d0912138ff2648ce9c1081d1653b73.zip gcc-2d48c13dc2d0912138ff2648ce9c1081d1653b73.tar.gz gcc-2d48c13dc2d0912138ff2648ce9c1081d1653b73.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expr.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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))); |