[PATCH, Fix PR 31098] a*C == b*C is not foldded to a == b with --fast-math/floating point

Tom Tromey tromey@redhat.com
Mon Oct 8 15:50:00 GMT 2007


>>>>> "Pranav" == Pranav Bhandarkar <pranav.bhandarkar@celunite.com> writes:

Pranav> 2007-10-07  Pranav Bhandarkar  <pranav.bhandarkar@celunite.com>
Pranav>   * fold-const.c (fold_comparison): fold (a OP c) CMP (b OP c) -> a
Pranav>   CMP b, iff c is not zero
Pranav>   * testsuite/pr31098.c: New

This does the wrong thing for:

int f(float a, float b)
{
  return a*-10 >= b*-10;
}

Tom



More information about the Gcc-patches mailing list