Check for NULL return from gen_lowpart_if_possible().
authorNick Clifton <nickc@cygnus.com>
Tue, 13 Oct 1998 11:39:26 +0000 (11:39 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 13 Oct 1998 11:39:26 +0000 (11:39 +0000)
From-SVN: r23049

gcc/ChangeLog
gcc/cse.c

index 863a563..077fbde 100644 (file)
@@ -1,3 +1,8 @@
+Tue Oct 13 11:37:45 1998  Nick Clifton  <nickc@cygnus.com>
+
+       * cse.c (equiv_constant): Check for NULL return from
+       gen_lowpart_if_possible().
+
 Tue Oct 13 11:24:51 1998  Jeffrey A Law  (law@cygnus.com)
 
        * collect2.c (main): Pass -EL/-EB through to the compiler.
index 8c0a666..1933fbc 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5860,7 +5860,7 @@ equiv_constant (x)
       && 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))
+  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