This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix bad casts in adjust_address_1 and offset_address
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 31 Mar 02 14:46:16 EST
- Subject: Fix bad casts in adjust_address_1 and offset_address
These cause Ada crashes on IA64. Committed to branch and trunk.
Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* emit-rtl.c (adjust_address_1, offset_address): Cast value to
unsigned HOST_WIDE_INT, not unsigned int.
*** emit-rtl.c 2002/03/09 12:49:43 1.249.2.4
--- emit-rtl.c 2002/03/31 19:26:31
*************** adjust_address_1 (memref, mode, offset,
*** 2004,2009 ****
if zero. */
if (offset != 0)
! memalign = MIN (memalign,
! (unsigned int) (offset & -offset) * BITS_PER_UNIT);
/* We can compute the size in a number of ways. */
--- 2004,2010 ----
if zero. */
if (offset != 0)
! memalign
! = MIN (memalign,
! (unsigned HOST_WIDE_INT) (offset & -offset) * BITS_PER_UNIT);
/* We can compute the size in a number of ways. */
*************** offset_address (memref, offset, pow2)
*** 2075,2079 ****
= get_mem_attrs (MEM_ALIAS_SET (memref), MEM_EXPR (memref), 0, 0,
MIN (MEM_ALIGN (memref),
! (unsigned int) pow2 * BITS_PER_UNIT),
GET_MODE (new));
return new;
--- 2076,2080 ----
= get_mem_attrs (MEM_ALIAS_SET (memref), MEM_EXPR (memref), 0, 0,
MIN (MEM_ALIGN (memref),
! (unsigned HOST_WIDE_INT) pow2 * BITS_PER_UNIT),
GET_MODE (new));
return new;