From 2ce5e1b422b29b6b85a271060d17fde8c8905974 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 13 Oct 1998 11:39:26 +0000 Subject: [PATCH] Check for NULL return from gen_lowpart_if_possible(). From-SVN: r23049 --- gcc/ChangeLog | 5 +++++ gcc/cse.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 863a563..077fbde 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 13 11:37:45 1998 Nick Clifton + + * 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 8c0a666..1933fbc 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 -- 2.7.4