hotspot/test/compiler/6877254/Test.java
author mcimadamore
Thu, 29 Jul 2010 15:57:43 +0100
changeset 6156 e15c221efaac
parent 5547 f4b087cbb361
child 7662 5f31baaff55b
permissions -rw-r--r--
6970833: Try-with-resource implementation throws an NPE during Flow analysis Summary: Updated logic not to rely upon Symbol.implementation (which check in superinterfaces) Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3904
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     1
/*
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4649
diff changeset
     2
 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
3904
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     4
 *
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     7
 * published by the Free Software Foundation.
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     8
 *
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    13
 * accompanied this code).
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    14
 *
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4649
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4649
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: 4649
diff changeset
    21
 * questions.
3904
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    22
 */
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    23
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    24
/**
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    25
 * @test
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    26
 * @bug 6877254
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    27
 * @summary Implement StoreCMNode::Ideal to promote its OopStore above the MergeMem
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    28
 *
4649
f6b04c5a5e49 6893701: compiler/6877254/Test.java fails because it combines -XX:+UseConcMarkSweepGC with other GC
kvn
parents: 3904
diff changeset
    29
 * @run main/othervm -Xcomp Test
3904
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    30
 */
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    31
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    32
public class Test {
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    33
    static byte var_1;
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    34
    static String var_2 = "";
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    35
    static byte var_3;
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    36
    static float var_4 = 0;
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    37
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    38
    public static void main(String[] args) {
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    39
        int i = 0;
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    40
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    41
        for (String var_tmp = var_2; i < 11; var_1 = 0, i++) {
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    42
            var_2 = var_2;
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    43
            var_4 *= (var_4 *= (var_3 = 0));
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    44
        }
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    45
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    46
        System.out.println("var_1 = " + var_1);
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    47
        System.out.println("var_2 = " + var_2);
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    48
        System.out.println("var_3 = " + var_3);
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    49
        System.out.println("var_4 = " + var_4);
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    50
    }
007a45522a7f 6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
cfang
parents:
diff changeset
    51
}