< prev index next >
test/compiler/c2/Test6741738.java
Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke
*** 23,41 ****
/*
* @test
* @bug 6741738
* @summary TypePtr::add_offset() set incorrect offset when the add overflows
! * @run main/othervm -Xcomp -XX:CompileOnly=Tester.foo Tester
*/
! public class Tester {
private String[] values;
private int count;
String foo() {
! int i = Integer.MAX_VALUE-1;
String s;
try {
s = values[i];
} catch (Throwable e) {
s = "";
--- 23,46 ----
/*
* @test
* @bug 6741738
* @summary TypePtr::add_offset() set incorrect offset when the add overflows
! *
! * @run main/othervm -Xcomp
! * -XX:CompileCommand=compileonly,compiler.c2.Test6741738::foo
! * compiler.c2.Test6741738
*/
! package compiler.c2;
!
! public class Test6741738 {
private String[] values;
private int count;
String foo() {
! int i = Integer.MAX_VALUE - 1;
String s;
try {
s = values[i];
} catch (Throwable e) {
s = "";
*** 42,50 ****
}
return s;
}
public static void main(String[] args) {
! Tester t = new Tester();
String s = t.foo();
}
}
--- 47,55 ----
}
return s;
}
public static void main(String[] args) {
! Test6741738 t = new Test6741738();
String s = t.foo();
}
}
< prev index next >