OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13d0ac2
)
d
author
law
<law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Dec 1997 13:15:21 +0000
(13:15 +0000)
committer
law
<law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Dec 1997 13:15:21 +0000
(13:15 +0000)
* expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the
offset's mode is not ptr_mode, convert it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17260
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/expr.c
patch
|
blob
|
history
diff --git
a/gcc/expr.c
b/gcc/expr.c
index
68fbbe9
..
623a903
100644
(file)
--- a/
gcc/expr.c
+++ b/
gcc/expr.c
@@
-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)));