Make sure int[] is loaded before running the test.
Otherwise the compiler would fail typing some instructions and bail.
Test: 563-checker-fakestring
Bug: 236940335
Change-Id: I69ce9b2ae296c6f47bb3c6ba86e52fa311cf46ff
diff --git a/test/563-checker-fakestring/src/Main.java b/test/563-checker-fakestring/src/Main.java
index 7e775b3..d45e803 100644
--- a/test/563-checker-fakestring/src/Main.java
+++ b/test/563-checker-fakestring/src/Main.java
@@ -34,6 +34,11 @@
}
}
+ // Create an empty int[] to force loading the int[] class before compiling
+ // TestCase.deoptimizeNewInstance.
+ // This makes sure the compiler can properly type int[] and not bail.
+ static int[] emptyArray = new int[0];
+
public static void main(String[] args) throws Throwable {
System.loadLibrary(args[0]);
Class<?> c = Class.forName("TestCase");