Patch to add gcc_assert to convert_memory_address

Steve Ellcey sje@cup.hp.com
Tue Apr 26 18:18:00 GMT 2005


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;



More information about the Gcc-patches mailing list