https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103121
--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> --- The EVRP range_of_expr is not context sensitive and if EVRP is in effect the EVRP active context is implicitely used, so when you try to ask for a different context you won't get that contexts result but the active one which might appear as "wrong result". Not sure if that happens here but that's my guess. And no, the EVRP range_of_expr shouldn't return "wrong" results - but you can't ask it for a context (the 'stmt' argument).