[Bug java/25676] New: Use of MIN_EXPR/MAX_EXPR is wrong for java

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 4 21:43:00 GMT 2006


Testcase:
class f
{
  public static double g(double a, double b)
  {
    return Math.min(a, b);
  }
  public static void main(String a[])
  {
    System.out.println (g(0.0, -0.0));
    System.out.println (g(-0.0, 0.0));
  }

}

----

This should print -0.0 and -0.0.  Currently it prints 0.0 -0.0 for
x86-linux-gnu.

Note it is okay to use MIN_EXPR/MAX_EXPR for integers though.


-- 
           Summary: Use of MIN_EXPR/MAX_EXPR is wrong for java
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: java
        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=25676




More information about the Gcc-bugs mailing list