On Thu, Mar 24, 2011 at 3:38 PM, Eric Botcazou <ebotca...@adacore.com> wrote:
> Hi,
>
> when fold_ternary_loc is attempting to make the tree prettier, e.g. by 
> swapping
> the arguments of a COND_EXPR, it does:
>
>  tem = fold_truth_not_expr (loc, arg0);
>
> Now LOC is the location that will be put on the whole expression and there is
> no reason it should override the location of ARG0, if any, when inverting it.
> The attached patch only ensures that - this gives more precise coverage info.
>
> Bootstrapped/regtested on x86_64-suse-linux, OK for the mainline?

Ok.

(I shortly thought about a PREFER_OVER_UNKNOWN_LOCATION
(maybe_unknown, loc) macro, but well ...)

Thanks,
Richard.

>
> 2011-03-24  Eric Botcazou  <ebotca...@adacore.com>
>
>        * fold-const.c (fold_ternary_loc): Preserve the location (if any) of
>        the argument in calls to fold_truth_not_expr.
>
>
> --
> Eric Botcazou
>

Reply via email to