------- Comment #21 from roger at eyesopen dot com 2006-02-20 21:07 ------- Created an attachment (id=10881) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10881&action=view) patch
I believe the following patch should resolve the problem. Bootstrap and regression test in progress. The issue is that -[0,(unsigned)-1] is being miscalculated in extract_range_from_unary_expr. This was simply negating the upper and lower bounds, and came up with [0,1]. If someone could double check my logic in the attached patch, [x, y] -> [-y, -x] when x > 0, [0, 0] -> [0, 0], and [0, y] -> varying, i.e. [0, (unsigned)-1] when y > 0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26361