------- Comment #2 from pinskia at gcc dot gnu dot org 2009-05-06 05:02 ------- Are you sure you are not running into unspecified behavior dealing with subexpression is computed without a sequence point? Because from your description you are running into that issue. As you mentioned you swapped around lhs and rhs and get the results you expect. And ICC produces a different result than GCC too.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40036