http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55299
--- Comment #2 from olly at survex dot com 2012-11-13 20:40:06 UTC --- Interestingly clang (at least 3.0-6 from Debian testing) fails to optimise the same testcase but shifting by a constant. For that variant case clang generates essentially the same code as GCC currently does.