< prev index next >

test/compiler/c2/Test6973329.java

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

*** 24,58 **** /** * @test * @bug 6973329 * @summary C2 with Zero based COOP produces code with broken anti-dependency on x86 * ! * @run main/othervm -Xbatch -Xcomp -XX:CompileOnly=Test Test */ ! class A { A next; int n; public int get_n() { ! return n+1; } ! } ! public class Test { A a; ! void test (A new_next) { A prev_next = a.next; a.next = new_next; if (prev_next == null) { a.n = a.get_n(); } } public static void main(String args[]) { ! Test t = new Test(); t.a = new A(); t.a.n = 1; t.test(new A()); if (t.a.n != 2) { System.out.println("Wrong value: " + t.a.n + " expected: 2"); --- 24,62 ---- /** * @test * @bug 6973329 * @summary C2 with Zero based COOP produces code with broken anti-dependency on x86 * ! * @run main/othervm -Xbatch -Xcomp ! * -XX:CompileCommand=compileonly,compiler.c2.Test6973329::* ! * compiler.c2.Test6973329 */ ! package compiler.c2; ! ! public class Test6973329 { ! static class A { A next; int n; public int get_n() { ! return n + 1; } ! } A a; ! void test(A new_next) { A prev_next = a.next; a.next = new_next; if (prev_next == null) { a.n = a.get_n(); } } public static void main(String args[]) { ! Test6973329 t = new Test6973329(); t.a = new A(); t.a.n = 1; t.test(new A()); if (t.a.n != 2) { System.out.println("Wrong value: " + t.a.n + " expected: 2");
< prev index next >