test/compiler/6792161/Test6792161.java

Wed, 21 May 2014 10:56:41 -0700

author
katleman
date
Wed, 21 May 2014 10:56:41 -0700
changeset 6672
fb9d124d9192
parent 3312
973293defacd
child 6876
710a3c8b516e
permissions
-rw-r--r--

Added tag jdk8u20-b15 for changeset 8c785f9bde6f

never@1634 1 /*
trims@1907 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
never@1634 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@1634 4 *
never@1634 5 * This code is free software; you can redistribute it and/or modify it
never@1634 6 * under the terms of the GNU General Public License version 2 only, as
never@1634 7 * published by the Free Software Foundation.
never@1634 8 *
never@1634 9 * This code is distributed in the hope that it will be useful, but WITHOUT
never@1634 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@1634 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@1634 12 * version 2 for more details (a copy is included in the LICENSE file that
never@1634 13 * accompanied this code).
never@1634 14 *
never@1634 15 * You should have received a copy of the GNU General Public License version
never@1634 16 * 2 along with this work; if not, write to the Free Software Foundation,
never@1634 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@1634 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
never@1634 22 *
never@1634 23 */
never@1634 24
never@1634 25 /**
never@1634 26 * @test
never@1634 27 * @bug 6792161
never@1634 28 * @summary assert("No dead instructions after post-alloc")
never@1634 29 *
iveresov@3312 30 * @run main/othervm/timeout=300 -Xcomp -XX:MaxInlineSize=120 Test6792161
never@1634 31 */
never@1634 32
never@1634 33 import java.lang.reflect.Constructor;
never@1634 34 public class Test6792161 {
never@1634 35 static Constructor test(Class cls) throws Exception {
never@1634 36 Class[] args= { String.class };
never@1634 37 try {
never@1634 38 return cls.getConstructor(args);
never@1634 39 } catch (NoSuchMethodException e) {}
never@1634 40 return cls.getConstructor(new Class[0]);
never@1634 41 }
never@1634 42 public static void main(final String[] args) throws Exception {
never@1634 43 try {
never@1634 44 for (int i = 0; i < 100000; i++) {
never@1634 45 Constructor ctor = test(Class.forName("Test6792161"));
never@1634 46 }
never@1634 47 } catch (NoSuchMethodException e) {}
never@1634 48 }
never@1634 49 }

mercurial