This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR middle-end/12705: Overlapping complex expressions
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Paul Brook <paul at nowt dot org>
- Date: Thu, 23 Oct 2003 13:54:13 -0600 (MDT)
- Subject: Re: [PATCH] PR middle-end/12705: Overlapping complex expressions
On Thu, 23 Oct 2003, Richard Henderson wrote:
> On Wed, Oct 22, 2003 at 05:03:48PM -0600, Roger Sayle wrote:
> > ! if (binoptab->code != UNKNOWN)
> > ! equiv_value
> > ! = gen_rtx_fmt_ee (binoptab->code, mode,
> > ! copy_rtx (op0), copy_rtx (op1));
> > ! else
> > ! equiv_value = 0;
>
> Why did you remove this check?
The code immediately before this in the function performs a switch on
binoptab->code with cases for PLUS, MINUS, MULT and DIV. The default
case calls abort(), so binoptab->code can never have the value UNKNOWN.
My motivation for the clean-up is that I was recently "burned" by
passing a NULL pointer as the "equiv" argument to emit_libcall_block.
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00635.html
Once I realized that the "equiv_value = 0;" was unreachable, I didn't
even bother to check whether emit_no_conflict_block had the same
restriction. This clean-up keeps our use of the emit_*_block functions
consistent.
Sorry for not explaining this aspect of the patch in my posting.
Roger
--