This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to add gcc_assert to convert_memory_address
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Apr 2005 11:00:58 -0700 (PDT)
- Subject: Patch to add gcc_assert to convert_memory_address
As part of another patch I was working on Richard Kenner suggested
adding a gcc_assert to convert_memory_address when
POINTERS_EXTEND_UNSIGNED is not defined. This patch does so. I tested
it on IA64 HP-UX, where POINTERS_EXTEND_UNSIGNED is defined and on IA64
Linux where POINTERS_EXTEND_UNSIGNED is not defined. Neither had any
regressions. Without the check for VOIDmode there were regressions and
a failure to bootstrap on Linux.
OK for checkin?
Steve Ellcey
sje@cup.hp.com
2005-04-26 Steve Ellcey <sje@cup.hp.com>
* explow.c (convert_memory_address): Add gcc_assert.
*** gcc.orig/gcc/explow.c Tue Apr 26 10:37:57 2005
--- gcc/gcc/explow.c Tue Apr 26 10:37:48 2005
*************** convert_memory_address (enum machine_mod
*** 313,318 ****
--- 313,319 ----
rtx x)
{
#ifndef POINTERS_EXTEND_UNSIGNED
+ gcc_assert (GET_MODE (x) == to_mode || GET_MODE (x) == VOIDmode);
return x;
#else /* defined(POINTERS_EXTEND_UNSIGNED) */
enum machine_mode from_mode;