RFC: PR 19650
Andrew Pinski
pinskia@physics.uc.edu
Fri Jan 28 03:27:00 GMT 2005
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
>> type
>> instead.
>>
>> 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.
See <http://gcc.gnu.org/ml/gcc/2004-12/msg00318.html>.
In fact I came up with the same patch which Dale came up with.
-- Pinski
More information about the Gcc
mailing list