The following code fails on powerpc64-linux compiled with -mpowerpc64 and -O1 or -O2; it passes with -O0, or without -mpowerpc64:
--------------------------------------------- extern void abort (void); int i = 274; float f = 1.0f; int main () { double d = i / f; if (d != 274.0) abort (); return 0; } -------------------------------------------- This fails with current trunk, with 4.1 and 4.0 branches, and with the last 3.4 branch build I did. This bug affects program vpr in SPEC CPU2000. -- Summary: wrong code for mixed-mode division with -mpowerpc64 -O1 Product: gcc Version: 4.0.4 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janis at gcc dot gnu dot org GCC target triplet: powerpc64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27619