From b7a4790e5a2884e62f6dc85aca1455b145e2a7db Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 29 Jun 2015 13:43:54 +0100 Subject: 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 --- test/519-bound-load-class/expected.txt | 0 test/519-bound-load-class/info.txt | 3 +++ test/519-bound-load-class/src/Main.java | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 test/519-bound-load-class/expected.txt create mode 100644 test/519-bound-load-class/info.txt create mode 100644 test/519-bound-load-class/src/Main.java (limited to 'test') 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 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); + } + } +} -- cgit v1.1