https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115191
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2024-05-22 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- 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 .