summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/020-string/expected.txt2
-rw-r--r--test/020-string/src/Main.java9
-rw-r--r--test/031-class-attributes/expected.txt2
-rw-r--r--test/439-npe/expected.txt72
-rw-r--r--test/439-npe/src/Main.java557
-rw-r--r--test/537-checker-arraycopy/src/Main.java4
6 files changed, 557 insertions, 89 deletions
diff --git a/test/020-string/expected.txt b/test/020-string/expected.txt
index 76b8929bd7..83a0835718 100644
--- a/test/020-string/expected.txt
+++ b/test/020-string/expected.txt
@@ -1,6 +1,6 @@
testStr is 'This is a very nice string'
This is a very nice string
-Compare result is 32
+Compare result is greater than zero
Compare unicode: -65302
Got expected exception
subStr is 'uick brown fox jumps over the lazy '
diff --git a/test/020-string/src/Main.java b/test/020-string/src/Main.java
index 710808255c..ccf94aabcc 100644
--- a/test/020-string/src/Main.java
+++ b/test/020-string/src/Main.java
@@ -45,7 +45,14 @@ public class Main {
if (testStr.length() != testStr2.length())
System.out.println("WARNING: stringTest length mismatch");
- System.out.println("Compare result is " + testStr.compareTo(testStr2));
+ int compareResult = testStr.compareTo(testStr2);
+ if (compareResult > 0) {
+ System.out.println("Compare result is greater than zero");
+ } else if (compareResult == 0) {
+ System.out.println("Compare result is equal to zero");
+ } else {
+ System.out.println("Compare result is less than zero");
+ }
// expected: -65302
String s1 = "\u0c6d\u0cb6\u0d00\u0000\u0080\u0080\u0080\u0000\u0002\u0002\u0002\u0000\u00e9\u00e9\u00e9";
diff --git a/test/031-class-attributes/expected.txt b/test/031-class-attributes/expected.txt
index de99872b52..72656ae916 100644
--- a/test/031-class-attributes/expected.txt
+++ b/test/031-class-attributes/expected.txt
@@ -84,7 +84,7 @@ abstract final [LClassAttrs$PackagePrivateInnerInterface;
enclosingCon: null
enclosingMeth: null
modifiers: 1
- package: package otherpackage
+ package: package otherpackage, Unknown, version 0.0
declaredClasses: [0]
member classes: [0]
isAnnotation: false
diff --git a/test/439-npe/expected.txt b/test/439-npe/expected.txt
index 271d40daed..34855ee91d 100644
--- a/test/439-npe/expected.txt
+++ b/test/439-npe/expected.txt
@@ -1,18 +1,54 @@
-$opt$setObjectField
-$opt$setIntField
-$opt$setFloatField
-$opt$setLongField
-$opt$setDoubleField
-$opt$setByteField
-$opt$setBooleanField
-$opt$setCharField
-$opt$setShortField
-$opt$getObjectField
-$opt$getIntField
-$opt$getFloatField
-$opt$getLongField
-$opt$getDoubleField
-$opt$getByteField
-$opt$getBooleanField
-$opt$getCharField
-$opt$getShortField
+$opt$noinline$setObjectField
+$opt$noinline$setIntField
+$opt$noinline$setFloatField
+$opt$noinline$setLongField
+$opt$noinline$setDoubleField
+$opt$noinline$setByteField
+$opt$noinline$setBooleanField
+$opt$noinline$setCharField
+$opt$noinline$setShortField
+$opt$noinline$getObjectField
+$opt$noinline$getIntField
+$opt$noinline$getFloatField
+$opt$noinline$getLongField
+$opt$noinline$getDoubleField
+$opt$noinline$getByteField
+$opt$noinline$getBooleanField
+$opt$noinline$getCharField
+$opt$noinline$getShortField
+$opt$noinline$setVolatileObjectField
+$opt$noinline$setVolatileIntField
+$opt$noinline$setVolatileFloatField
+$opt$noinline$setVolatileLongField
+$opt$noinline$setVolatileDoubleField
+$opt$noinline$setVolatileByteField
+$opt$noinline$setVolatileBooleanField
+$opt$noinline$setVolatileCharField
+$opt$noinline$setVolatileShortField
+$opt$noinline$getVolatileObjectField
+$opt$noinline$getVolatileIntField
+$opt$noinline$getVolatileFloatField
+$opt$noinline$getVolatileLongField
+$opt$noinline$getVolatileDoubleField
+$opt$noinline$getVolatileByteField
+$opt$noinline$getVolatileBooleanField
+$opt$noinline$getVolatileCharField
+$opt$noinline$getVolatileShortField
+$opt$noinline$setObjectElement
+$opt$noinline$setIntElement
+$opt$noinline$setFloatElement
+$opt$noinline$setLongElement
+$opt$noinline$setDoubleElement
+$opt$noinline$setByteElement
+$opt$noinline$setBooleanElement
+$opt$noinline$setCharElement
+$opt$noinline$setShortElement
+$opt$noinline$getObjectElement
+$opt$noinline$getIntElement
+$opt$noinline$getFloatElement
+$opt$noinline$getLongElement
+$opt$noinline$getDoubleElement
+$opt$noinline$getByteElement
+$opt$noinline$getBooleanElement
+$opt$noinline$getCharElement
+$opt$noinline$getShortElement
diff --git a/test/439-npe/src/Main.java b/test/439-npe/src/Main.java
index 40c2645796..8f66da04de 100644
--- a/test/439-npe/src/Main.java
+++ b/test/439-npe/src/Main.java
@@ -15,199 +15,624 @@
*/
public class Main {
+ public static boolean doThrow = false;
- private volatile Object objectField;
- private volatile int intField;
- private volatile float floatField;
- private volatile long longField;
- private volatile double doubleField;
- private volatile byte byteField;
- private volatile boolean booleanField;
- private volatile char charField;
- private volatile short shortField;
-
- public static void $opt$setObjectField(Main m) {
+ private Object objectField;
+ private int intField;
+ private float floatField;
+ private long longField;
+ private double doubleField;
+ private byte byteField;
+ private boolean booleanField;
+ private char charField;
+ private short shortField;
+
+ private volatile Object volatileObjectField;
+ private volatile int volatileIntField;
+ private volatile float volatileFloatField;
+ private volatile long volatileLongField;
+ private volatile double volatileDoubleField;
+ private volatile byte volatileByteField;
+ private volatile boolean volatileBooleanField;
+ private volatile char volatileCharField;
+ private volatile short volatileShortField;
+
+ public static void $opt$noinline$setObjectField(Main m) {
+ if (doThrow) { throw new Error(); }
m.objectField = null;
}
- public static void $opt$setIntField(Main m) {
+ public static void $opt$noinline$setIntField(Main m) {
+ if (doThrow) { throw new Error(); }
m.intField = 0;
}
- public static void $opt$setFloatField(Main m) {
+ public static void $opt$noinline$setFloatField(Main m) {
+ if (doThrow) { throw new Error(); }
m.floatField = 0;
}
- public static void $opt$setLongField(Main m) {
+ public static void $opt$noinline$setLongField(Main m) {
+ if (doThrow) { throw new Error(); }
m.longField = 0;
}
- public static void $opt$setDoubleField(Main m) {
+ public static void $opt$noinline$setDoubleField(Main m) {
+ if (doThrow) { throw new Error(); }
m.doubleField = 0;
}
- public static void $opt$setByteField(Main m) {
+ public static void $opt$noinline$setByteField(Main m) {
+ if (doThrow) { throw new Error(); }
m.byteField = 0;
}
- public static void $opt$setBooleanField(Main m) {
+ public static void $opt$noinline$setBooleanField(Main m) {
+ if (doThrow) { throw new Error(); }
m.booleanField = false;
}
- public static void $opt$setCharField(Main m) {
+ public static void $opt$noinline$setCharField(Main m) {
+ if (doThrow) { throw new Error(); }
m.charField = 0;
}
- public static void $opt$setShortField(Main m) {
+ public static void $opt$noinline$setShortField(Main m) {
+ if (doThrow) { throw new Error(); }
m.shortField = 0;
}
- public static Object $opt$getObjectField(Main m) {
+ public static Object $opt$noinline$getObjectField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.objectField;
}
- public static int $opt$getIntField(Main m) {
+ public static int $opt$noinline$getIntField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.intField;
}
- public static float $opt$getFloatField(Main m) {
+ public static float $opt$noinline$getFloatField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.floatField;
}
- public static long $opt$getLongField(Main m) {
+ public static long $opt$noinline$getLongField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.longField;
}
- public static double $opt$getDoubleField(Main m) {
+ public static double $opt$noinline$getDoubleField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.doubleField;
}
- public static byte $opt$getByteField(Main m) {
+ public static byte $opt$noinline$getByteField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.byteField;
}
- public static boolean $opt$getBooleanField(Main m) {
+ public static boolean $opt$noinline$getBooleanField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.booleanField;
}
- public static char $opt$getCharField(Main m) {
+ public static char $opt$noinline$getCharField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.charField;
}
- public static short $opt$getShortField(Main m) {
+ public static short $opt$noinline$getShortField(Main m) {
+ if (doThrow) { throw new Error(); }
return m.shortField;
}
+ public static void $opt$noinline$setVolatileObjectField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileObjectField = null;
+ }
+
+ public static void $opt$noinline$setVolatileIntField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileIntField = 0;
+ }
+
+ public static void $opt$noinline$setVolatileFloatField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileFloatField = 0;
+ }
+
+ public static void $opt$noinline$setVolatileLongField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileLongField = 0;
+ }
+
+ public static void $opt$noinline$setVolatileDoubleField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileDoubleField = 0;
+ }
+
+ public static void $opt$noinline$setVolatileByteField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileByteField = 0;
+ }
+
+ public static void $opt$noinline$setVolatileBooleanField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileBooleanField = false;
+ }
+
+ public static void $opt$noinline$setVolatileCharField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileCharField = 0;
+ }
+
+ public static void $opt$noinline$setVolatileShortField(Main m) {
+ if (doThrow) { throw new Error(); }
+ m.volatileShortField = 0;
+ }
+
+ public static Object $opt$noinline$getVolatileObjectField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileObjectField;
+ }
+
+ public static int $opt$noinline$getVolatileIntField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileIntField;
+ }
+
+ public static float $opt$noinline$getVolatileFloatField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileFloatField;
+ }
+
+ public static long $opt$noinline$getVolatileLongField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileLongField;
+ }
+
+ public static double $opt$noinline$getVolatileDoubleField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileDoubleField;
+ }
+
+ public static byte $opt$noinline$getVolatileByteField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileByteField;
+ }
+
+ public static boolean $opt$noinline$getVolatileBooleanField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileBooleanField;
+ }
+
+ public static char $opt$noinline$getVolatileCharField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileCharField;
+ }
+
+ public static short $opt$noinline$getVolatileShortField(Main m) {
+ if (doThrow) { throw new Error(); }
+ return m.volatileShortField;
+ }
+
+ public static void $opt$noinline$setObjectElement(Object[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = null;
+ }
+
+ public static void $opt$noinline$setIntElement(int[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static void $opt$noinline$setFloatElement(float[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static void $opt$noinline$setLongElement(long[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static void $opt$noinline$setDoubleElement(double[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static void $opt$noinline$setByteElement(byte[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static void $opt$noinline$setBooleanElement(boolean[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = false;
+ }
+
+ public static void $opt$noinline$setCharElement(char[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static void $opt$noinline$setShortElement(short[] a) {
+ if (doThrow) { throw new Error(); }
+ a[0] = 0;
+ }
+
+ public static Object $opt$noinline$getObjectElement(Object[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static int $opt$noinline$getIntElement(int[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static float $opt$noinline$getFloatElement(float[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static long $opt$noinline$getLongElement(long[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static double $opt$noinline$getDoubleElement(double[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static byte $opt$noinline$getByteElement(byte[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static boolean $opt$noinline$getBooleanElement(boolean[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static char $opt$noinline$getCharElement(char[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
+ public static short $opt$noinline$getShortElement(short[] a) {
+ if (doThrow) { throw new Error(); }
+ return a[0];
+ }
+
public static void main(String[] args) {
- int methodLine = 30;
- int thisLine = 103;
+ int methodLine = 42;
+ int thisLine = 312;
+ try {
+ $opt$noinline$setObjectField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 2, methodLine, "$opt$noinline$setObjectField");
+ }
+ try {
+ $opt$noinline$setIntField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setIntField");
+ }
+ try {
+ $opt$noinline$setFloatField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setFloatField");
+ }
+ try {
+ $opt$noinline$setLongField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setLongField");
+ }
+ try {
+ $opt$noinline$setDoubleField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setDoubleField");
+ }
+ try {
+ $opt$noinline$setByteField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setByteField");
+ }
+ try {
+ $opt$noinline$setBooleanField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setBooleanField");
+ }
+ try {
+ $opt$noinline$setCharField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setCharField");
+ }
+ try {
+ $opt$noinline$setShortField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setShortField");
+ }
+ try {
+ $opt$noinline$getObjectField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getObjectField");
+ }
+ try {
+ $opt$noinline$getIntField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getIntField");
+ }
+ try {
+ $opt$noinline$getFloatField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getFloatField");
+ }
+ try {
+ $opt$noinline$getLongField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getLongField");
+ }
+ try {
+ $opt$noinline$getDoubleField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getDoubleField");
+ }
+ try {
+ $opt$noinline$getByteField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getByteField");
+ }
+ try {
+ $opt$noinline$getBooleanField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getBooleanField");
+ }
+ try {
+ $opt$noinline$getCharField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getCharField");
+ }
+ try {
+ $opt$noinline$getShortField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getShortField");
+ }
+ try {
+ $opt$noinline$setVolatileObjectField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileObjectField");
+ }
+ try {
+ $opt$noinline$setVolatileIntField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileIntField");
+ }
+ try {
+ $opt$noinline$setVolatileFloatField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileFloatField");
+ }
+ try {
+ $opt$noinline$setVolatileLongField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileLongField");
+ }
+ try {
+ $opt$noinline$setVolatileDoubleField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileDoubleField");
+ }
+ try {
+ $opt$noinline$setVolatileByteField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileByteField");
+ }
+ try {
+ $opt$noinline$setVolatileBooleanField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileBooleanField");
+ }
+ try {
+ $opt$noinline$setVolatileCharField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileCharField");
+ }
+ try {
+ $opt$noinline$setVolatileShortField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setVolatileShortField");
+ }
+ try {
+ $opt$noinline$getVolatileObjectField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileObjectField");
+ }
+ try {
+ $opt$noinline$getVolatileIntField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileIntField");
+ }
+ try {
+ $opt$noinline$getVolatileFloatField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileFloatField");
+ }
+ try {
+ $opt$noinline$getVolatileLongField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileLongField");
+ }
+ try {
+ $opt$noinline$getVolatileDoubleField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileDoubleField");
+ }
+ try {
+ $opt$noinline$getVolatileByteField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileByteField");
+ }
+ try {
+ $opt$noinline$getVolatileBooleanField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileBooleanField");
+ }
+ try {
+ $opt$noinline$getVolatileCharField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileCharField");
+ }
+ try {
+ $opt$noinline$getVolatileShortField(null);
+ throw new RuntimeException("Failed to throw NullPointerException.");
+ } catch (NullPointerException npe) {
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getVolatileShortField");
+ }
try {
- $opt$setObjectField(null);
+ $opt$noinline$setObjectElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 2, methodLine, "$opt$setObjectField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setObjectElement");
}
try {
- $opt$setIntField(null);
+ $opt$noinline$setIntElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setIntField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setIntElement");
}
try {
- $opt$setFloatField(null);
+ $opt$noinline$setFloatElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setFloatField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setFloatElement");
}
try {
- $opt$setLongField(null);
+ $opt$noinline$setLongElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setLongField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setLongElement");
}
try {
- $opt$setDoubleField(null);
+ $opt$noinline$setDoubleElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setDoubleField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setDoubleElement");
}
try {
- $opt$setByteField(null);
+ $opt$noinline$setByteElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setByteField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setByteElement");
}
try {
- $opt$setBooleanField(null);
+ $opt$noinline$setBooleanElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setBooleanField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setBooleanElement");
}
try {
- $opt$setCharField(null);
+ $opt$noinline$setCharElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setCharField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setCharElement");
}
try {
- $opt$setShortField(null);
+ $opt$noinline$setShortElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$setShortField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$setShortElement");
}
try {
- $opt$getObjectField(null);
+ $opt$noinline$getObjectElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getObjectField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getObjectElement");
}
try {
- $opt$getIntField(null);
+ $opt$noinline$getIntElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getIntField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getIntElement");
}
try {
- $opt$getFloatField(null);
+ $opt$noinline$getFloatElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getFloatField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getFloatElement");
}
try {
- $opt$getLongField(null);
+ $opt$noinline$getLongElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getLongField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getLongElement");
}
try {
- $opt$getDoubleField(null);
+ $opt$noinline$getDoubleElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getDoubleField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getDoubleElement");
}
try {
- $opt$getByteField(null);
+ $opt$noinline$getByteElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getByteField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getByteElement");
}
try {
- $opt$getBooleanField(null);
+ $opt$noinline$getBooleanElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getBooleanField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getBooleanElement");
}
try {
- $opt$getCharField(null);
+ $opt$noinline$getCharElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getCharField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getCharElement");
}
try {
- $opt$getShortField(null);
+ $opt$noinline$getShortElement(null);
throw new RuntimeException("Failed to throw NullPointerException.");
} catch (NullPointerException npe) {
- check(npe, thisLine += 6, methodLine += 4, "$opt$getShortField");
+ check(npe, thisLine += 6, methodLine += 5, "$opt$noinline$getShortElement");
}
}
diff --git a/test/537-checker-arraycopy/src/Main.java b/test/537-checker-arraycopy/src/Main.java
index 7c124caa8e..95a11ca010 100644
--- a/test/537-checker-arraycopy/src/Main.java
+++ b/test/537-checker-arraycopy/src/Main.java
@@ -51,10 +51,10 @@ public class Main {
/// CHECK-START-X86_64: void Main.arraycopy() disassembly (after)
/// CHECK: InvokeStaticOrDirect intrinsic:SystemArrayCopy
- /// CHECK-NOT: test
+ /// CHECK-NOT: test {{^[^\[].*}}, {{^[^\[].*}}
/// CHECK-NOT: call
/// CHECK: ReturnVoid
- // Checks that the call is intrinsified and that there is no test instruction
+ // Checks that the call is intrinsified and that there is no register test instruction
// when we know the source and destination are not null.
public static void arraycopy() {
Object[] obj = new Object[4];