[PATCH] Fix optimization regression in constant folder

Richard Guenther richard.guenther@gmail.com
Mon Sep 17 14:45:00 GMT 2007


On 9/17/07, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> The fix for PR middle-end/30364 disabled association of expressions with more
> than 1 variable if the type doesn't wrap.  This is a bit problematic for Ada
> because variable-sized types generate lots of size calculations and we want
> to simplify them at compile time as much as possible.
>
> Bootstrapped/regtested on i586-suse-linux, OK for mainline?

I don't think this is correct.  [Note: all this TYPE_IS_SIZETYPE
specialities have
to go somewhen - they really confuse things]

First of all, this misses a (optimization) testcase.  Second, why do we use
signed sizetype calculations when we want unsigned semantics as far as
overflow behavior is concerned?

Richard.

> 2007-09-17  Eric Botcazou  <ebotcazou@adacore.com>
>
>         * fold-const.c (fold_binary): Associate again expressions with more
>         than one variable for size types.



More information about the Gcc-patches mailing list