------- Comment #13 from rguenth at gcc dot gnu dot org 2009-04-24 16:41 ------- <bb 4>: x_11 = ASSERT_EXPR <x_13, x_13 <= 10>; x.0_3 = (unsigned int) x_11; D.1241_4 = x.0_3 + 0x0ffffffff; if (D.1241_4 > 9)
x.0_3: [1, 10] D.1241_4: [0, +INF] so it's only only the usual case of not handling overflow properly during evaluation. [1, 10] + -1U is [0(overflow), 9(overflow)] for VRP and so it falls back to VARYING. To fix this we need to know the direction of overflow. See also PR30318. The patch I was refering to made VRP able to derive a range from the D.1241_4 > 9 test. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39870