http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50315
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-09-07 Ever Confirmed|0 |1 --- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-07 10:34:43 UTC --- Not obvious where (+ (+ (* a b) c) (* d e)) -> (+ (+ (* a b) (* d e)) c) would have happened from looking at the testcase, but it looks like after the patch the expressions are left-associative while before they are randomly paired. After the patch we match what is present in the source. There is no way to recover from that, the transform is invalid. Re-association is not possible for integer types with undefined overflow unless 1) the no-undefined-overflow branch materializes, or 2) you re-associate by transforming the arithmetic to twos-complement (unsigned). Well, "confirmed". Sort-of.