I'm in doubt about exact compiler info, cause I want to report a bug from Gentoo bugzilla, where reporter was using 4.3.2, but I could reproduce it with 4.4.0. We're both on x86. It's http://bugs.gentoo.org/show_bug.cgi?id=276146. A rather simple code fragment gets miscompiled, but after making a few changes, that arithmetically are no-ops, it can be compiled correctly.
Created attachment 18124 [details] a testcase for the bug As I said in the Gentoo bug, one version of the 'area' line produces correct result, other does not and while that 'printf' should arithmetically be a no-op, it's required for correct compilation. I forgot to add that at least -O is required to trigger the bug, with -O0, both versions work fine, even without 'printf'.
Due to that 'printf' thing, it seems vaguely similar to bug 39333, however here neither of the switches mentioned there has an effect.
Created attachment 18125 [details] data for the test
Can't reproduce in any active branch, thus already fixed for 4.5.0, 4.4.1, 4.3.4 (maybe 4.3.3 too).
It definitely doesn't work in 4.3.3. I'll attach generated assembly.
Created attachment 18127 [details] this is correct assembly ...when 'printf' and '(x0*(y0+dy) - (x0+dx)*y0)'
Created attachment 18128 [details] this is the incorrect one ...with 'printf' and 'x0*y1-x1*y0' Both with '-O2' (though -0 is enough).
Though perhaps I didn't need to reopen. Just making sure: could you reproduce it with one of the mentioned versions ?
Yes, is not fixed in 4.3.3. Is already fixed for 4.3.4, etc.