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

--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Confirmed.
> 
>                       /* After the optimization PHI result can have value
>                          which it couldn't have previously.  */
>                       int_range_max r;
>                       if (get_global_range_query ()->range_of_expr (r,
> phires,
>                                                                     phi))
> 
> 
> Yes int_range_max here is almost definitely wrong for pointer types.
> Note this code is originally from r13-4878-g3d6bb832022160 .

Exactly.  Assuming r could be either an integer or a pointer, that should be
Value_Range which is type agnostic.

Reply via email to