http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33259
--- Comment #4 from Ken Raeburn <raeburn at raeburn dot org> 2011-09-05 22:45:28 UTC --- I did a little experimentation with git revision c3f18f1 and it looks like it does the right thing (optimizes away the calculations and returns a constant) with Andrew Pinski's simplified test case if the argument is unsigned, but still executes the code if the argument is signed.