Skip to content

Commit f3e3eca

Browse files
author
Rahul Raghavan
committed
8238812: assert(false) failed: bad AD file
1 parent 527628e commit f3e3eca

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
24+
/**
25+
* @test
26+
* @bug 8238812
27+
* @summary Fix c2 assert(false) failed: bad AD file
28+
* @run main/othervm -XX:CompileCommand=compileonly,compiler.c2.Test8238812::test
29+
* -XX:CompileCommand=dontinline,compiler.c2.Test8238812::test
30+
* -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+UseSwitchProfiling
31+
* compiler.c2.Test8238812
32+
*/
33+
34+
package compiler.c2;
35+
36+
public class Test8238812 {
37+
38+
public static void test() {
39+
int i4, i5=99, i6, i9=89;
40+
for (i4 = 12; i4 < 365; i4++) {
41+
for (i6 = 5; i6 > 1; i6--) {
42+
switch ((i6 * 5) + 11) {
43+
case 13:
44+
case 19:
45+
case 26:
46+
case 31:
47+
case 35:
48+
case 41:
49+
case 43:
50+
case 61:
51+
case 71:
52+
case 83:
53+
case 314:
54+
i9 = i5;
55+
break;
56+
}
57+
}
58+
}
59+
}
60+
61+
public static void main(String[] strArr) {
62+
for (int i = 0; i < 10; i++) {
63+
test();
64+
}
65+
}
66+
67+
}

0 commit comments

Comments
 (0)