1199N/A/*
1472N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1199N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1199N/A *
1199N/A * This code is free software; you can redistribute it and/or modify it
1199N/A * under the terms of the GNU General Public License version 2 only, as
1199N/A * published by the Free Software Foundation.
1199N/A *
1199N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1199N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1199N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1199N/A * version 2 for more details (a copy is included in the LICENSE file that
1199N/A * accompanied this code).
1199N/A *
1199N/A * You should have received a copy of the GNU General Public License version
1199N/A * 2 along with this work; if not, write to the Free Software Foundation,
1199N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1199N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
1199N/A *
1199N/A */
1199N/A
1199N/A/**
1199N/A * @test
1199N/A * @bug 6792161
1199N/A * @summary assert("No dead instructions after post-alloc")
1199N/A *
2959N/A * @run main/othervm/timeout=300 -Xcomp -XX:MaxInlineSize=120 Test6792161
1199N/A */
1199N/A
1199N/Aimport java.lang.reflect.Constructor;
1199N/Apublic class Test6792161 {
1199N/A static Constructor test(Class cls) throws Exception {
1199N/A Class[] args= { String.class };
1199N/A try {
1199N/A return cls.getConstructor(args);
1199N/A } catch (NoSuchMethodException e) {}
1199N/A return cls.getConstructor(new Class[0]);
1199N/A }
1199N/A public static void main(final String[] args) throws Exception {
1199N/A try {
1199N/A for (int i = 0; i < 100000; i++) {
1199N/A Constructor ctor = test(Class.forName("Test6792161"));
1199N/A }
1199N/A } catch (NoSuchMethodException e) {}
1199N/A }
1199N/A}