test/compiler/6866651/Test.java

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 1907
c18cbe5936b8
child 6876
710a3c8b516e
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

cfang@1362 1 /*
trims@1907 2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
cfang@1362 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cfang@1362 4 *
cfang@1362 5 * This code is free software; you can redistribute it and/or modify it
cfang@1362 6 * under the terms of the GNU General Public License version 2 only, as
cfang@1362 7 * published by the Free Software Foundation.
cfang@1362 8 *
cfang@1362 9 * This code is distributed in the hope that it will be useful, but WITHOUT
cfang@1362 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cfang@1362 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
cfang@1362 12 * version 2 for more details (a copy is included in the LICENSE file that
cfang@1362 13 * accompanied this code).
cfang@1362 14 *
cfang@1362 15 * You should have received a copy of the GNU General Public License version
cfang@1362 16 * 2 along with this work; if not, write to the Free Software Foundation,
cfang@1362 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cfang@1362 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
cfang@1362 22 */
cfang@1362 23
cfang@1362 24 /**
cfang@1362 25 * @test
cfang@1362 26 * @bug 6866651
cfang@1362 27 * @summary delay dead node elimination in set_req_X to prevent killing the current node when it is in use
cfang@1362 28 *
cfang@1362 29 * @run main Test
cfang@1362 30 */
cfang@1362 31
cfang@1362 32 public class Test {
cfang@1362 33
cfang@1362 34 static int sum() {
cfang@1362 35 int s = 0;
cfang@1362 36 for (int x = 1, y = 0; x != 0; x++, y--) {
cfang@1362 37 s ^= y;
cfang@1362 38 }
cfang@1362 39 return s;
cfang@1362 40 }
cfang@1362 41
cfang@1362 42 public static void main(final String[] args) {
cfang@1362 43 for (int k = 0; k < 2; k++) {
cfang@1362 44 System.err.println(String.valueOf(sum()));
cfang@1362 45 }
cfang@1362 46 }
cfang@1362 47 }

mercurial