summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-06-29 13:43:54 +0100
committerNicolas Geoffray <ngeoffray@google.com>2015-06-29 22:12:48 +0100
commitb7a4790e5a2884e62f6dc85aca1455b145e2a7db (patch)
treebf0a44cef7f95ceae58cec7835a01ef134867725 /test
parentd735c41e95a5d89cc9dad0c78d7d052579d8bd41 (diff)
downloadart-b7a4790e5a2884e62f6dc85aca1455b145e2a7db.zip
art-b7a4790e5a2884e62f6dc85aca1455b145e2a7db.tar.gz
art-b7a4790e5a2884e62f6dc85aca1455b145e2a7db.tar.bz2
Revert "Revert "Do not update the type of something we already know.""
This reverts commit 63107a804ce17db9789051e1fe310d99d1dae1cb. bug:22116987 (cherry picked from commit f9a199571417b5a5a62d94d05a064077e14dd2c4) Change-Id: Ia516f2cbce6d22df37f3a0854abdd0b54d3ea72d
Diffstat (limited to 'test')
-rw-r--r--test/519-bound-load-class/expected.txt0
-rw-r--r--test/519-bound-load-class/info.txt3
-rw-r--r--test/519-bound-load-class/src/Main.java24
3 files changed, 27 insertions, 0 deletions
diff --git a/test/519-bound-load-class/expected.txt b/test/519-bound-load-class/expected.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/519-bound-load-class/expected.txt
diff --git a/test/519-bound-load-class/info.txt b/test/519-bound-load-class/info.txt
new file mode 100644
index 0000000..5763962
--- /dev/null
+++ b/test/519-bound-load-class/info.txt
@@ -0,0 +1,3 @@
+Regression test for the optimizing compiler that
+used to crash when a `HCheckCast` did not have a `HLoadClass`
+as second input.
diff --git a/test/519-bound-load-class/src/Main.java b/test/519-bound-load-class/src/Main.java
new file mode 100644
index 0000000..41bb951
--- /dev/null
+++ b/test/519-bound-load-class/src/Main.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class Main {
+ public static void main(String[] args) {
+ Object o = Main.class;
+ if (o instanceof Main) {
+ System.out.println((Main)o);
+ }
+ }
+}