< prev index next >

test/compiler/c2/Test6799693.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke

*** 24,47 **** /* * @test * @bug 6799693 * @summary Server compiler leads to data corruption when expression throws an Exception ! * @run main/othervm -Xcomp -XX:CompileOnly=Test Test */ ! public class Test { static int var_bad = 1; ! public static void main(String[] args) ! { var_bad++; try { ! for (int i = 0; i < 10; i++) (new byte[((byte)-1 << i)])[0] = 0; } - catch (Exception e) { System.out.println("Got " + e); } System.out.println("Test.var_bad = " + var_bad + " (expected 2)\n"); } } --- 24,52 ---- /* * @test * @bug 6799693 * @summary Server compiler leads to data corruption when expression throws an Exception ! * ! * @run main/othervm -Xcomp ! * -XX:CompileCommand=compileonly,compiler.c2.Test6799693::* ! * compiler.c2.Test6799693 */ ! package compiler.c2; ! ! public class Test6799693 { static int var_bad = 1; ! public static void main(String[] args) { var_bad++; try { ! for (int i = 0; i < 10; i++) (new byte[((byte) -1 << i)])[0] = 0; ! } catch (Exception e) { ! System.out.println("Got " + e); } System.out.println("Test.var_bad = " + var_bad + " (expected 2)\n"); } }
< prev index next >