This is the mail archive of the
mailing list for the GCC project.
Re: RFC: PR 19650
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Thu, 27 Jan 2005 19:41:23 -0500
- Subject: Re: RFC: PR 19650
- References: <Pine.LNX.firstname.lastname@example.org>
On Jan 27, 2005, at 5:19 PM, Roger Sayle wrote:
On Thu, 27 Jan 2005, Dale Johannesen wrote:
I'm not sure where in the twisty little passages this should be fixed,
but fold_binary_op_with_conditional_arg is taking a type from the
EQ_EXPR, even though that should always be boolean (right)? Which is
suspicious, and I'm inclined to think it should be using the input
Does this look like the right approach?
Ahh, the perils of STRIP_NOPS. Firstly, the type that corresponds to
the result of EQ_EXPR is defined by the front-end, "bool" in C++, "int"
in C, and even several different LOGICAL(n) types in the gfortran
front-ends, so "fold" should always be using the type of the EQ_EXPR.
I knew I had ran into this before but I did not have a testcase for the
mainline. I had a testcase with my tree combiner but nothing else.
In fact I came up with the same patch which Dale came up with.