This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Propsed patch to cse.c


Hi,

  I would like to submit the enclosed patch for consideration.  It
prevents a segmentation faul when compiling
newlib/libc/stdlib/mallocr.c for the m32r toolchain, by allowing
equiv_constant() to cope with the call to gen_lowpart_if_possible()
returning 0.

Cheers
	Nick


Tue Aug 25 11:38:21 1998  Nick Clifton  <nickc@cygnus.com>

	* cse.c (equiv_constant): Cope with gen_lowpart_if_possible()
	returning 0.


Index: cse.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cse.c,v
retrieving revision 1.46
diff -p -w -r1.46 cse.c
*** cse.c	1998/08/14 16:28:29	1.46
--- cse.c	1998/08/25 21:59:27
*************** equiv_constant (x)
*** 5768,5774 ****
        && qty_const[reg_qty[REGNO (x)]])
      x = gen_lowpart_if_possible (GET_MODE (x), qty_const[reg_qty[REGNO (x)]]);
  
!   if (x != 0 && CONSTANT_P (x))
      return x;
  
    /* If X is a MEM, try to fold it outside the context of any insn to see if
--- 5768,5774 ----
        && qty_const[reg_qty[REGNO (x)]])
      x = gen_lowpart_if_possible (GET_MODE (x), qty_const[reg_qty[REGNO (x)]]);
  
!   if (x == 0 || CONSTANT_P (x))
      return x;
  
    /* If X is a MEM, try to fold it outside the context of any insn to see if


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]