2
* Copyright (c) 2022, Red Hat, Inc. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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.
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).
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.
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
27
* @summary C2 compilation asserts with "Bad graph detected in compute_lca_of_uses"
28
* @run main/othervm -XX:-BackgroundCompilation TestNewArrayBadSize
31
public class TestNewArrayBadSize {
35
void vMeth(int i, long l) {
37
for (i1 = 5; i1 > 1; i1 -= 2)
41
for (Object temp = new byte[i19]; ; i19 = "1".equals("0") ? 2 : 1) {}
45
} catch (Throwable ax$3) {
49
void mainTest(String[] strArr1) {
50
vMeth(iFld, instanceCount);
53
public static void main(String[] strArr) {
54
TestNewArrayBadSize _instance = new TestNewArrayBadSize();
55
for (int i = 0; i < 10_000; ++i) _instance.mainTest(strArr);