cfang@1420: /* cfang@1420: * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. cfang@1420: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. cfang@1420: * cfang@1420: * This code is free software; you can redistribute it and/or modify it cfang@1420: * under the terms of the GNU General Public License version 2 only, as cfang@1420: * published by the Free Software Foundation. cfang@1420: * cfang@1420: * This code is distributed in the hope that it will be useful, but WITHOUT cfang@1420: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or cfang@1420: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License cfang@1420: * version 2 for more details (a copy is included in the LICENSE file that cfang@1420: * accompanied this code). cfang@1420: * cfang@1420: * You should have received a copy of the GNU General Public License version cfang@1420: * 2 along with this work; if not, write to the Free Software Foundation, cfang@1420: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. cfang@1420: * cfang@1420: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, cfang@1420: * CA 95054 USA or visit www.sun.com if you need additional information or cfang@1420: * have any questions. cfang@1420: */ cfang@1420: cfang@1420: /** cfang@1420: * @test cfang@1420: * @bug 6877254 cfang@1420: * @summary Implement StoreCMNode::Ideal to promote its OopStore above the MergeMem cfang@1420: * cfang@1420: * @run main/othervm -server -Xcomp -XX:+UseConcMarkSweepGC Test cfang@1420: */ cfang@1420: cfang@1420: public class Test { cfang@1420: static byte var_1; cfang@1420: static String var_2 = ""; cfang@1420: static byte var_3; cfang@1420: static float var_4 = 0; cfang@1420: cfang@1420: public static void main(String[] args) { cfang@1420: int i = 0; cfang@1420: cfang@1420: for (String var_tmp = var_2; i < 11; var_1 = 0, i++) { cfang@1420: var_2 = var_2; cfang@1420: var_4 *= (var_4 *= (var_3 = 0)); cfang@1420: } cfang@1420: cfang@1420: System.out.println("var_1 = " + var_1); cfang@1420: System.out.println("var_2 = " + var_2); cfang@1420: System.out.println("var_3 = " + var_3); cfang@1420: System.out.println("var_4 = " + var_4); cfang@1420: } cfang@1420: }