https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77889
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-10-07 CC| |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- 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. unsigned f (int i) { if (i >= 0 && i < 2) { const char *p = "abc"; p += i; return __builtin_strlen (p); } return 0; } Found new range for _2: [0, 1] marking stmt to be not simulated again Visiting statement: p_6 = "abc" + _2; Found new range for p_6: VARYING Visiting statement: _3 = __builtin_strlen (p_6); Found new range for _3: VARYING p_6 would be [&"abc", &"abc"+1] not sure if we have a useful way to represent it. I guess &MEM["abc"], &MEM["abc" + 1] with the same &STRING_CST would be it.