summaryrefslogtreecommitdiff
path: root/test/546-regression-simplify-catch/src/Main.java
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-11-05 21:25:24 +0000
committer David Brazdil <dbrazdil@google.com> 2015-11-06 19:20:46 +0000
commit9bc436160b4af99067973affb0b1008de9a2b04c (patch)
tree160fba56aa8ba53a5db624c42c1936dd15a3cdf7 /test/546-regression-simplify-catch/src/Main.java
parentef7ef4ce04a46405e15cd91115c6e657235adf83 (diff)
ART: Fix simplification of catch blocks in the presence of dead code
Simplification of catch blocks transforms the code so that catch blocks have only exceptional predecessors. However, it is invoked before trivially dead code is eliminated which breaks simple assumptions such as the fact that a catch block cannot start with move-exception if it has non-exceptional predecessors. This patch fixes the algorithm to work under these relaxed conditions. Bug: 25494450 Bug: 25492628 Change-Id: Idc8d010102a4b8b9a6cd918b98d6e11d1838db0c
Diffstat (limited to 'test/546-regression-simplify-catch/src/Main.java')
-rw-r--r--test/546-regression-simplify-catch/src/Main.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/546-regression-simplify-catch/src/Main.java b/test/546-regression-simplify-catch/src/Main.java
new file mode 100644
index 0000000000..8eddac3fea
--- /dev/null
+++ b/test/546-regression-simplify-catch/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 {
+
+ // Workaround for b/18051191.
+ class InnerClass {}
+
+ public static void main(String[] args) {}
+
+}