-
Bug
-
Resolution: Fixed
-
P4
-
1.1.6
-
1.1.6
-
x86
-
windows_nt
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2020690 | 1.2.0 | Deepa Viswanathan | P4 | Resolved | Fixed | 1.2beta4 |
Name: tb29552 Date: 05/18/98
=20
NOTE: This is a bug in 1.1.6, but the bugreport form didn't let me enter th=
at...
Symantecs JIT seems to optimize away important code. The code below, compil=
ed
using the standard javac, demonstrates a bug in the JIT on my computer (NT4=
/sp3).
Excuse the poor formatting...
public class JitBug
{
public static void test(long param) {
=09long a =3D param;=20
=09long smallNumber =3D 1;=20
=20
boolean large =3D param > smallNumber;
if (!large)=20
System.out.println("Small number.");
else=20
System.out.println("Large number. Should be OK.");
=20
if (a < smallNumber)
=09=09a *=3D 100;
=09=09
// remove the next line to see another bug.
=09=09if (large && a !=3D param) System.out.println("\nJit error!!!\n");
=09=09
=09=09System.out.println(a + " and " + param + " should be equal.");
}
=20
public static void main(String[] args) {
test(19980910120545L); // this works
=09=09test(21030101000001L); // this doesn't
}
}
(Review ID: 29051)
======================================================================
- backported by
-
JDK-2020690 Symantecs JIT seems to optimize away important code.
-
- Resolved
-