diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-13 11:39:26 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-13 11:39:26 +0000 |
commit | f2f6be4565380f4ab92a1a6df083064f680ac3c3 (patch) | |
tree | 5f02543dbcfccbb702ddae77f40d70b47e92c407 | |
parent | fb1c80dfd3ef8011ff7e456321c72f8c30f889d8 (diff) | |
download | gcc-f2f6be4565380f4ab92a1a6df083064f680ac3c3.tar.gz |
Check for NULL return from gen_lowpart_if_possible().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23049 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cse.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 863a563a53a..077fbdeb740 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/cse.c b/gcc/cse.c index 8c0a6661364..1933fbc75d1 100644 --- 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 |