expr.c (expand_assignment): Extend offset_rtx with convert_to_mode not with convert_m...
authorSteve Ellcey <sje@cup.hp.com>
Thu, 10 Apr 2003 19:39:07 +0000 (19:39 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 10 Apr 2003 19:39:07 +0000 (19:39 +0000)
* expr.c (expand_assignment): Extend offset_rtx with convert_to_mode
not with convert_memory_address.
(store_constructor): Ditto, and same for copy_size_rtx.
(expand_expr): Ditto.

From-SVN: r65433

gcc/ChangeLog
gcc/expr.c

index 1d272bba2e5ae0ffaa3a4ed98fba4ce07084b9d7..dd2d12a43dad9027326cb9d12ee102ada1b0c37e 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-10  Steve Ellcey  <sje@cup.hp.com>
+
+       * expr.c (expand_assignment): Extend offset_rtx with convert_to_mode
+       not with convert_memory_address.
+       (store_constructor): Ditto, and same for copy_size_rtx.
+       (expand_expr): Ditto.
+
 2003-04-10  Douglas B Rupp  <rupp@gnat.com>
 
        * config/i386/i386.c (ix86_ms_bitfield_layout_p): Fix formatting.
index 075de49f8198b932d8f2b85b92701d66f4ec2119..a2b547e47a5e7fcd3cf915dad6d57e125813223a 100644 (file)
@@ -4122,7 +4122,7 @@ expand_assignment (to, from, want_value, suggest_reg)
 
 #ifdef POINTERS_EXTEND_UNSIGNED
          if (GET_MODE (offset_rtx) != Pmode)
-           offset_rtx = convert_memory_address (Pmode, offset_rtx);
+           offset_rtx = convert_to_mode (Pmode, offset_rtx, 0);
 #else
          if (GET_MODE (offset_rtx) != ptr_mode)
            offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
@@ -4630,7 +4630,8 @@ store_expr (exp, target, want_value)
              rtx label = 0;
 
              /* Copy that much.  */
-             copy_size_rtx = convert_to_mode (ptr_mode, copy_size_rtx, 0);
+             copy_size_rtx = convert_to_mode (ptr_mode, copy_size_rtx,
+                                              TREE_UNSIGNED (sizetype));
              emit_block_move (target, temp, copy_size_rtx,
                               (want_value & 2
                                ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
@@ -4651,8 +4652,8 @@ store_expr (exp, target, want_value)
 
 #ifdef POINTERS_EXTEND_UNSIGNED
                  if (GET_MODE (copy_size_rtx) != Pmode)
-                   copy_size_rtx = convert_memory_address (Pmode,
-                                                           copy_size_rtx);
+                   copy_size_rtx = convert_to_mode (Pmode, copy_size_rtx,
+                                                    TREE_UNSIGNED (sizetype));
 #endif
 
                  target = offset_address (target, copy_size_rtx,
@@ -4957,7 +4958,7 @@ store_constructor (exp, target, cleared, size)
 
 #ifdef POINTERS_EXTEND_UNSIGNED
              if (GET_MODE (offset_rtx) != Pmode)
-               offset_rtx = convert_memory_address (Pmode, offset_rtx);
+               offset_rtx = convert_to_mode (Pmode, offset_rtx, 0);
 #else
              if (GET_MODE (offset_rtx) != ptr_mode)
                offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
@@ -7448,7 +7449,7 @@ expand_expr (exp, target, tmode, modifier)
 
 #ifdef POINTERS_EXTEND_UNSIGNED
            if (GET_MODE (offset_rtx) != Pmode)
-             offset_rtx = convert_memory_address (Pmode, offset_rtx);
+             offset_rtx = convert_to_mode (Pmode, offset_rtx, 0);
 #else
            if (GET_MODE (offset_rtx) != ptr_mode)
              offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);