# HG changeset patch # User Bernhard Urban # Date 1367484904 -7200 # Node ID c5bdf71cb5d745ae363e77329eefd71e993c0ee4 # Parent 789cfd153265a3d928e6c7846a05ff800ec86671 nested checkcasts: add failing testcase by Christian Wimmer diff -r 789cfd153265 -r c5bdf71cb5d7 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/EliminateNestedCheckCastsTest.java --- 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() {