http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30318
--- Comment #15 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 13:50:17 UTC --- Looking at your second patch it looks entirely reasonable, though not globbing MULT_EXPR together with PLUS/MINUS might be better for readability (thus, in the end I'd like extract_range_from_binary_expr_1 to be a big switch-case on the operation code). I didn't finish refactoring the code when I last touched it - the idea was to have primitives for range arithmetic. I've looked at my own pending patch and it doesn't look as nicely structured as yours.