test/hotspot/jtreg/compiler/c2/Test6901572.java
author iignatyev
Mon, 18 Feb 2019 09:31:07 -0800
changeset 53791 bec6c8739833
parent 47216 71c04702a3d5
permissions -rw-r--r--
8219157: vm/mlvm/mixed/stress/java/findDeadlock should be problem-listed only on mac Reviewed-by: thartmann
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
/*
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4453
diff changeset
     2
 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
4453
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
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4453
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4453
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4453
diff changeset
    21
 * questions.
4453
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
 *
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    29
 * @run main/othervm compiler.c2.Test6901572
4453
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
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    32
package compiler.c2;
4453
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    33
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    34
public class Test6901572 {
4453
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    35
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    36
    public static void main(String[] args) {
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    37
        for (int i = 0; i < 2; i++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    38
            NestedLoop();
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
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    41
    public static long NestedLoop() {
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    42
        final int n = 50;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    43
        long startTime = System.currentTimeMillis();
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    44
        int x = 0;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    45
        for(int a = 0; a < n; a++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    46
            for(int b = 0; b < n; b++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    47
                for(int c = 0; c < n; c++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    48
                    for(int d = 0; d < n; d++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    49
                        for(int e = 0; e < n; e++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    50
                            for(int f = 0; f < n; f++)
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    51
                                x++;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    52
        long stopTime = System.currentTimeMillis();
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    53
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    54
        return stopTime - startTime;
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    55
    }
a431438150d4 6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff changeset
    56
}