Duplicate :
|
The Lang JCK stmt08210 fails both in product and debug mode when run in -Xcomp mode. Reproducible in 1.4.1_05; not reproducible in 1.4.2 Here is the test case: /* * @(#)stmt08210.java 1.1 02/06/28 * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.io.PrintStream; public class stmt08210 { static int a1 = 0; static int a2 = 0; static int a3 = 0; static int a4 = 0; static int a5 = 0; static int a6 = 0; static { do { if (a1 == 2) { a6++; break; } } while (++a1 > 0); } static { do { if (a3 == 1) a5 += 1; else do { if (a1 < 3) a4 += 1; else break; } while (a1++ > 0); } while (a3++ < 5); a2 += 1; } public static void main(String argv[]) { System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/); } public static int run(String argv[], PrintStream out) { if (a1 == 3 && a2 == 1 && a3 == 6 && a4 == 1 && a5 == 1 && a6 == 1) return 0/*STATUS_PASSED*/; out.println ("failed"); out.println( a1+" "+a2+" "+a3+" "+a4+" "+a5+" "+a6); return 2/*STATUS_FAILED*/; } } ______________________________________________ bash-2.00$ /java/re/jdk/1.4.1_05/promoted/latest/binaries/solaris-sparc/bin/java_g -Xcomp stmt08210 bash-2.00$ /java/re/jdk/1.4.1_05/promoted/latest/binaries/solaris-sparc/bin/java_g -Xcomp -server stmt08210 failed 3 1 6 1 1 0