hotspot/test/compiler/6901572/Test.java
author mikejwre
Thu, 25 Mar 2010 15:05:15 -0700
changeset 5074 9c9bfe8f3a47
parent 4453 a431438150d4
child 5547 f4b087cbb361
permissions -rw-r--r--
Added tag jdk7-b87 for changeset 8367da959bab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4453
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     1
/*
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     2
 * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     4
 *
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     7
 * published by the Free Software Foundation.
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     8
 *
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    13
 * accompanied this code).
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    14
 *
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    18
 *
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    21
 * have any questions.
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    22
 */
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    23
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    24
/**
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    25
 * @test
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    26
 * @bug 6901572
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    27
 * @summary JVM 1.6.16 crash on loops: assert(has_node(i),"")
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    28
 *
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    29
 * @run main/othervm Test
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    30
 */
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    31
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    32
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    33
public class Test {
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    34
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    35
    public static void main(String[] args) {
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    36
        for (int i = 0; i < 2; i++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    37
            NestedLoop();
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    38
    }
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    39
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    40
    public static long NestedLoop() {
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    41
        final int n = 50;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    42
        long startTime = System.currentTimeMillis();
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    43
        int x = 0;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    44
        for(int a = 0; a < n; a++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    45
            for(int b = 0; b < n; b++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    46
                for(int c = 0; c < n; c++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    47
                    for(int d = 0; d < n; d++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    48
                        for(int e = 0; e < n; e++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    49
                            for(int f = 0; f < n; f++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    50
                                x++;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    51
        long stopTime = System.currentTimeMillis();
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    52
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    53
        return stopTime - startTime;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    54
    }
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    55
}