changeset 9492:c5bdf71cb5d7

nested checkcasts: add failing testcase by Christian Wimmer
author Bernhard Urban <bernhard.urban@jku.at>
date Thu, 02 May 2013 10:55:04 +0200
parents 789cfd153265
children 38b07e59dcbb
files graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/EliminateNestedCheckCastsTest.java
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/EliminateNestedCheckCastsTest.java	Thu May 02 06:08:02 2013 +0200
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/EliminateNestedCheckCastsTest.java	Thu May 02 10:55:04 2013 +0200
@@ -65,6 +65,22 @@
         compileSnippet("test2Snippet", 5, 2);
     }
 
+    public static long test3Snippet(A1 a1) {
+        long result = a1.x1;
+        A2 a2 = (A2) a1;
+        if (a1.x1 == 42) {
+            A3 a3 = (A3) a2;
+            result = a3.x3;
+        }
+        return result;
+    }
+
+    @Ignore
+    @Test
+    public void test3() {
+        compileSnippet("test3Snippet", 2, 2);
+    }
+
     private StructuredGraph compileSnippet(final String snippet, final int checkcasts, final int afterCanon) {
         return Debug.scope(snippet, new Callable<StructuredGraph>() {