https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77889
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > So you are complaining that VRP doesn't compute a range for n? Because I > can't see the tree-ssa-strlen pass computing ranges. > > Confirmed for VRP. It seems to ignore most builtins completely. I wasn't suggesting the problem is in VRP but rather in tree-ssa-strlen. My patch for bug 77608 makes it work by having the plus_stmt_object_size function call get_range_info to obtain the range for the offset so it seems that the same approach should work for strlen. (Please note this isn't meant to be a complaint. I'm pointing out an opportunity for improvement.)