test/compiler/6877254/Test.java

Mon, 14 Sep 2009 09:49:54 -0700

author
cfang
date
Mon, 14 Sep 2009 09:49:54 -0700
changeset 1420
685e959d09ea
child 1613
648fe315b257
permissions
-rw-r--r--

6877254: Server vm crashes with no branches off of store slice" when run with CMS and UseSuperWord(default)
Summary: design StoreCMNode::Ideal to promote its oopStore input if the input is a MergeMem node
Reviewed-by: kvn, never

cfang@1420 1 /*
cfang@1420 2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
cfang@1420 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cfang@1420 4 *
cfang@1420 5 * This code is free software; you can redistribute it and/or modify it
cfang@1420 6 * under the terms of the GNU General Public License version 2 only, as
cfang@1420 7 * published by the Free Software Foundation.
cfang@1420 8 *
cfang@1420 9 * This code is distributed in the hope that it will be useful, but WITHOUT
cfang@1420 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cfang@1420 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
cfang@1420 12 * version 2 for more details (a copy is included in the LICENSE file that
cfang@1420 13 * accompanied this code).
cfang@1420 14 *
cfang@1420 15 * You should have received a copy of the GNU General Public License version
cfang@1420 16 * 2 along with this work; if not, write to the Free Software Foundation,
cfang@1420 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cfang@1420 18 *
cfang@1420 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
cfang@1420 20 * CA 95054 USA or visit www.sun.com if you need additional information or
cfang@1420 21 * have any questions.
cfang@1420 22 */
cfang@1420 23
cfang@1420 24 /**
cfang@1420 25 * @test
cfang@1420 26 * @bug 6877254
cfang@1420 27 * @summary Implement StoreCMNode::Ideal to promote its OopStore above the MergeMem
cfang@1420 28 *
cfang@1420 29 * @run main/othervm -server -Xcomp -XX:+UseConcMarkSweepGC Test
cfang@1420 30 */
cfang@1420 31
cfang@1420 32 public class Test {
cfang@1420 33 static byte var_1;
cfang@1420 34 static String var_2 = "";
cfang@1420 35 static byte var_3;
cfang@1420 36 static float var_4 = 0;
cfang@1420 37
cfang@1420 38 public static void main(String[] args) {
cfang@1420 39 int i = 0;
cfang@1420 40
cfang@1420 41 for (String var_tmp = var_2; i < 11; var_1 = 0, i++) {
cfang@1420 42 var_2 = var_2;
cfang@1420 43 var_4 *= (var_4 *= (var_3 = 0));
cfang@1420 44 }
cfang@1420 45
cfang@1420 46 System.out.println("var_1 = " + var_1);
cfang@1420 47 System.out.println("var_2 = " + var_2);
cfang@1420 48 System.out.println("var_3 = " + var_3);
cfang@1420 49 System.out.println("var_4 = " + var_4);
cfang@1420 50 }
cfang@1420 51 }

mercurial