The following two functions should be equzlivant when overflow is undefined: int f(int a, int b) { return a * 10 == b*10; }
int f1(int a, int b) { return a==b; } -- Summary: a*C == b*C where C is a constant is not optimized to a == b Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31096