< prev index next >

test/compiler/c2/Test6832293.java

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

*** 24,79 **** /* * @test * @bug 6832293 * @summary JIT compiler got wrong result in type checking with -server ! * @run main/othervm -Xcomp -XX:CompileOnly=Test.run Test */ import java.io.PrintStream; ! interface SomeInterface { int SEVENS = 777; ! } ! interface AnotherInterface { int THIRDS = 33; ! } ! class SomeClass implements SomeInterface { int i; SomeClass(int i) { this.i = i; } ! } ! class ImmediateSubclass extends SomeClass implements SomeInterface { float f; ImmediateSubclass(int i, float f) { super(i); this.f = f; } ! } ! final class FinalSubclass extends ImmediateSubclass implements AnotherInterface { double d; FinalSubclass(int i, float f, double d) { super(i, f); this.d = d; } ! } - public class Test { - public static void main(String args[]) throws Exception{ /* try to pre initialize */ SomeClass[] a=new SomeClass[10]; ! Class.forName("ImmediateSubclass"); ! Class.forName("FinalSubclass"); System.exit(run(args, System.out) + 95/*STATUS_TEMP*/); } static int errorStatus = 0/*STATUS_PASSED*/; --- 24,84 ---- /* * @test * @bug 6832293 * @summary JIT compiler got wrong result in type checking with -server ! * ! * @run main/othervm -Xcomp ! * -XX:CompileCommand=compileonly,compiler.c2.Test6832293::run ! * compiler.c2.Test6832293 */ + package compiler.c2; + import java.io.PrintStream; ! public class Test6832293 { ! static interface SomeInterface { int SEVENS = 777; ! } ! static interface AnotherInterface { int THIRDS = 33; ! } ! static class SomeClass implements SomeInterface { int i; SomeClass(int i) { this.i = i; } ! } ! static class ImmediateSubclass extends SomeClass implements SomeInterface { float f; ImmediateSubclass(int i, float f) { super(i); this.f = f; } ! } ! static final class FinalSubclass extends ImmediateSubclass implements AnotherInterface { double d; FinalSubclass(int i, float f, double d) { super(i, f); this.d = d; } ! } public static void main(String args[]) throws Exception{ /* try to pre initialize */ SomeClass[] a=new SomeClass[10]; ! String className = Test6832293.class.getName(); ! Class.forName(className + "$ImmediateSubclass"); ! Class.forName(className + "$FinalSubclass"); System.exit(run(args, System.out) + 95/*STATUS_TEMP*/); } static int errorStatus = 0/*STATUS_PASSED*/;
< prev index next >