< prev index next >

test/compiler/c2/Test6799693.java

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

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