Take the following example: double BG_SplineLength () { double lastPoint; double i;
for (i = 0.01;i<=1;i+=0.1f) if (!(i != 0.0)) { lastPoint = i; } else { lastPoint = 2; } return lastPoint; } The loop is useless and we should remove the loop and make the function just return 2.0; -- Summary: VRP does not work with floating points Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24021