aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorDonn Terry <donn@interix.com>1999-04-15 22:52:22 +0000
committerJeff Law <law@gcc.gnu.org>1999-04-15 16:52:22 -0600
commit6419e5b06383f259492f5365dc8a907c54cca709 (patch)
treec50f6fe210a439b10bf95e200141e62b3ef4d163 /gcc/expr.c
parent79dc434ecff9515f48e101547b4cbd866aedcca1 (diff)
downloadgcc-6419e5b06383f259492f5365dc8a907c54cca709.zip
gcc-6419e5b06383f259492f5365dc8a907c54cca709.tar.gz
gcc-6419e5b06383f259492f5365dc8a907c54cca709.tar.bz2
expr.c (expand_assignment): Force pointers to proper mode if POINTERS_EXTEND_UNSIGNED is defined.
* expr.c (expand_assignment): Force pointers to proper mode if POINTERS_EXTEND_UNSIGNED is defined. From-SVN: r26484
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 8d5a540..5b6b2a7 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3393,7 +3393,14 @@ expand_assignment (to, from, want_value, suggest_reg)
emit_block_move (to_rtx, value, expr_size (from),
TYPE_ALIGN (TREE_TYPE (from)) / BITS_PER_UNIT);
else
- emit_move_insn (to_rtx, value);
+ {
+#ifdef POINTERS_EXTEND_UNSIGNED
+ if (TREE_CODE (to) == REFERENCE_TYPE
+ || TREE_CODE (to) == POINTER_TYPE)
+ value = convert_memory_address (GET_MODE (to_rtx), value);
+#endif
+ emit_move_insn (to_rtx, value);
+ }
preserve_temp_slots (to_rtx);
free_temp_slots ();
pop_temp_slots ();