I recently encountered the JCK-compiler failure
lang/FP/fpl035/fpl03501m1/fpl03501m1.html
and I narrowed it down to the runtime. I inserted the following debugging
code into the compiler in the class com.sun.tools.javac.v8.comp.ConstFold:
private void testDouble(double x, double y) {
double prod = x * y;
Double result = new Double(prod);
if (prod != result.doubleValue()) System.out.println("" + x + "*" + y +"=" + result.doubleValue());
}
With a correctly working runtime system this should never print anything.
But with the enclosed javac compiler run on the enclosed program
pl03501m1.java, it does print something repeatedly, illustrating that
the runtime is messing up. I have also enclosed a script that can be
used to reproduce the problem and the class files for the test version
of javac that illustrates the problem.
Can you please begin running JCK-compiler on your nightly builds?
neal.gafter@Eng 2001-03-13
frog$ sh compile.sh
+ /usr/local/java/jdk1.4.0/solsparc/bin/java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b55)
Java HotSpot(TM) Client VM (build 1.4beta-B55, mixed mode)
+ /usr/local/java/jdk1.4.0/solsparc/bin/java -Xfuture -Xbootclasspath/p:gjclasses -classpath gjclasses com.sun.tools.javac.Main fpl03501m1.java
6.6268385579E10*1.2882300697616103E-231=2.0284345933011414E-148
33096.0*33096.0=1.2882300697616103E-231
1.2882300697616103E-231*33096.0=1.7159024186905625E12
1.7159024186905625E12*33096.0=3.0767017410273385E-102
3.0767017410273385E-102*33096.0=8.332353415161909E82
8.332353415161909E82*33096.0=6.478759514952929E-127
33096.0*33096.0=1.2882300697616103E-231
[and so on]
lang/FP/fpl035/fpl03501m1/fpl03501m1.html
and I narrowed it down to the runtime. I inserted the following debugging
code into the compiler in the class com.sun.tools.javac.v8.comp.ConstFold:
private void testDouble(double x, double y) {
double prod = x * y;
Double result = new Double(prod);
if (prod != result.doubleValue()) System.out.println("" + x + "*" + y +"=" + result.doubleValue());
}
With a correctly working runtime system this should never print anything.
But with the enclosed javac compiler run on the enclosed program
pl03501m1.java, it does print something repeatedly, illustrating that
the runtime is messing up. I have also enclosed a script that can be
used to reproduce the problem and the class files for the test version
of javac that illustrates the problem.
Can you please begin running JCK-compiler on your nightly builds?
neal.gafter@Eng 2001-03-13
frog$ sh compile.sh
+ /usr/local/java/jdk1.4.0/solsparc/bin/java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b55)
Java HotSpot(TM) Client VM (build 1.4beta-B55, mixed mode)
+ /usr/local/java/jdk1.4.0/solsparc/bin/java -Xfuture -Xbootclasspath/p:gjclasses -classpath gjclasses com.sun.tools.javac.Main fpl03501m1.java
6.6268385579E10*1.2882300697616103E-231=2.0284345933011414E-148
33096.0*33096.0=1.2882300697616103E-231
1.2882300697616103E-231*33096.0=1.7159024186905625E12
1.7159024186905625E12*33096.0=3.0767017410273385E-102
3.0767017410273385E-102*33096.0=8.332353415161909E82
8.332353415161909E82*33096.0=6.478759514952929E-127
33096.0*33096.0=1.2882300697616103E-231
[and so on]