[patch] Minor improvement to fold_unary_loc
Jeff Law
law@redhat.com
Wed May 14 16:55:00 GMT 2014
On 05/14/14 04:40, Eric Botcazou wrote:
> Hi,
>
> this makes fold_unary_loc fold NON_LVALUE_EXPR if the argument cannot be a
> lvalue (this happens when you're re-fold-building an existing tree) and
> changes the first call to fold_convert_const to use arg0 instead of op0, like
> the other 2 calls just below (this should not change anything if the argument
> is correctly folded, but is more forgiving if it is not).
>
> Tested on x86_64-suse-linux, OK for the mainline?
>
>
> 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
>
> * fold-const (fold_unary_loc) <NON_LVALUE_EXPR>: New case.
> <CASE_CONVERT>: Pass arg0 instead of op0 to fold_convert_const.
Seems reasonable. Do you happen to have a testcase where you can see
the effects in one of the dumps?
Jeff
More information about the Gcc-patches
mailing list