[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/29203] New: 64-bit unclean logic found in _Jv_ulp

From: debian-gcc at lists dot debian dot org
Subject: [Bug classpath/29203] New: 64-bit unclean logic found in _Jv_ulp
Date: 24 Sep 2006 13:31:23 -0000

[forwarded from http://bugs.debian.org/348792]

Although the tweak for string-to-double conversion on 64-bit systems
that made it into the latest gcj-4.0 upload has been a definite
improvement, the new code still fails on at least one input:
attempting to convert "1e-308" goes into an infinite loop.

ikvm's long-suffering amd64 build now tickles this when attempting to
compile DoubleToString.java, so I'm reopening #327407 as well.

$ cat DoubleConvTest.java
  class DoubleConvTest {
      public static void main(String[] args) {
          String s = args[0];
          System.out.print("in:  " + s + "\n");
          Double d = new Double(s);
          System.out.print("out: " + d + "\n");

hangs, when calling with "1e-308"

suggested patch:

--- src/libjava/classpath/native/fdlibm/mprec.c~        2006-09-05
09:47:02.000000000 -0400
+++ src/libjava/classpath/native/fdlibm/mprec.c 2006-09-05 13:15:28.000000000
@@ -666,7 +666,7 @@
 _DEFUN (ulp, (_x), double _x)
   union double_union x, a;
-  register __Long L;
+  register int32_t L;

   x.d = _x;

           Summary: 64-bit unclean logic found in _Jv_ulp
           Product: classpath
           Version: 0.92
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]