test/compiler/6901572/Test.java

Wed, 09 May 2012 13:07:42 -0700

author
katleman
date
Wed, 09 May 2012 13:07:42 -0700
changeset 3719
4ee58fcab520
parent 1907
c18cbe5936b8
child 6876
710a3c8b516e
permissions
-rw-r--r--

Added tag jdk8-b37 for changeset bfcf92bfefb8

cfang@1518 1 /*
trims@1907 2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
cfang@1518 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cfang@1518 4 *
cfang@1518 5 * This code is free software; you can redistribute it and/or modify it
cfang@1518 6 * under the terms of the GNU General Public License version 2 only, as
cfang@1518 7 * published by the Free Software Foundation.
cfang@1518 8 *
cfang@1518 9 * This code is distributed in the hope that it will be useful, but WITHOUT
cfang@1518 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cfang@1518 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
cfang@1518 12 * version 2 for more details (a copy is included in the LICENSE file that
cfang@1518 13 * accompanied this code).
cfang@1518 14 *
cfang@1518 15 * You should have received a copy of the GNU General Public License version
cfang@1518 16 * 2 along with this work; if not, write to the Free Software Foundation,
cfang@1518 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cfang@1518 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.
cfang@1518 22 */
cfang@1518 23
cfang@1518 24 /**
cfang@1518 25 * @test
cfang@1518 26 * @bug 6901572
cfang@1518 27 * @summary JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang@1518 28 *
cfang@1518 29 * @run main/othervm Test
cfang@1518 30 */
cfang@1518 31
cfang@1518 32
cfang@1518 33 public class Test {
cfang@1518 34
cfang@1518 35 public static void main(String[] args) {
cfang@1518 36 for (int i = 0; i < 2; i++)
cfang@1518 37 NestedLoop();
cfang@1518 38 }
cfang@1518 39
cfang@1518 40 public static long NestedLoop() {
cfang@1518 41 final int n = 50;
cfang@1518 42 long startTime = System.currentTimeMillis();
cfang@1518 43 int x = 0;
cfang@1518 44 for(int a = 0; a < n; a++)
cfang@1518 45 for(int b = 0; b < n; b++)
cfang@1518 46 for(int c = 0; c < n; c++)
cfang@1518 47 for(int d = 0; d < n; d++)
cfang@1518 48 for(int e = 0; e < n; e++)
cfang@1518 49 for(int f = 0; f < n; f++)
cfang@1518 50 x++;
cfang@1518 51 long stopTime = System.currentTimeMillis();
cfang@1518 52
cfang@1518 53 return stopTime - startTime;
cfang@1518 54 }
cfang@1518 55 }

mercurial