author | mcimadamore |
Wed, 26 Oct 2016 15:41:25 +0100 | |
changeset 41856 | 13a056e8f16e |
parent 41029 | 869e95ade880 |
permissions | -rw-r--r-- |
41029
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
1 |
/* |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
4 |
* |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
8 |
* |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
13 |
* accompanied this code). |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
14 |
* |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
18 |
* |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
21 |
* questions. |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
22 |
*/ |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
23 |
|
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
24 |
/* |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
25 |
* @test |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
26 |
* @bug 8160699 |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
27 |
* @summary Verify that having finished executing a switch statement live locals are exactly the same as it was upon entry of the switch. |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
28 |
* @run main SwitchExitStateTest |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
29 |
*/ |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
30 |
|
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
31 |
public class SwitchExitStateTest { |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
32 |
public static void main(String[] args) throws Exception { |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
33 |
switch (0) { |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
34 |
case 0: |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
35 |
String a = ""; |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
36 |
break; |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
37 |
default: |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
38 |
throw new Exception("Unknown "); |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
39 |
} |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
40 |
|
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
41 |
switch (0) { |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
42 |
case 0: |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
43 |
String b = ""; |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
44 |
break; |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
45 |
default: |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
46 |
throw new Exception("Unknown "); |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
47 |
} |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
48 |
} |
869e95ade880
8160699: java.lang.VerifyError: Inconsistent stackmap frames at branch target
sadayapalam
parents:
diff
changeset
|
49 |
} |