https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92131

--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> From what I can see, the weird + 0x7ffffffffffffffe is created when
> extract_range_from_plus_minus_expr is called with PLUS_EXPR and VARYING and
> long int [-INF, e.7_8 + -1] ranges.
>       /* Build the symbolic bounds if needed.  */
>       adjust_symbolic_bound (min, code, expr_type,
>                              sym_min_op0, sym_min_op1,
>                              neg_min_op0, neg_min_op1);
>       adjust_symbolic_bound (max, code, expr_type,
>                              sym_max_op0, sym_max_op1,
>                              neg_max_op0, neg_max_op1);
> in there.  max_op0 is 9223372036854775807 (maximum of VARYING), and max_op1
> is -1 (which is not the upper bound, just an offset against the symbolic).
> combine_bound adds this into wmax, so 9223372036854775807 + -1 gives
> 0x7ffffffffffffffe and that is what is used.

This looks like the bug, i.e. combine_bound shouldn't be called on VARYING.

Reply via email to