-
Bug
-
Resolution: Fixed
-
P1
-
1.0
-
1.1
-
x86
-
windows_nt
Name: dkC59003 Date: 04/26/99
HotSpot does not pass the test below (return value is 97)
in compiled mode (-Xcomp option is on):
$ java -version
java version "1.2"
HotSpot VM (1.0fcs, mixed mode, build E)
$ java -Xcomp b4211151
$ echo $?
97
The same problem for sparc was reported by the bug #4211151 (fixed)
----------------------------------------------------------- b4211151.java
import java.io.PrintStream;
public class b4211151 {
public static void main( String argv[] ) {
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String args[], PrintStream out) {
int overallStatus = 0;
for (int i = 0; i < 3; i++) {
overallStatus += comp();
}
return (overallStatus == 0 ? 0/*STATUS_PASSED*/ : 2/*STATUS_FAILED*/);
}
static int comp() {
float zerof = 0.0f;
if (! Float.toString(zerof * - zerof).startsWith("-")) {
return 2/*STATUS_FAILED*/;
}
return 0/*STATUS_PASSED*/;
}
}
-----------------------------------------------------------
======================================================================
- relates to
-
JDK-4211151 StressJCK expr26201 had bad floating point code (1.0f * 2.0d <= 0.0d)
-
- Closed
-