2126N/A/*
2126N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2126N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2126N/A *
2126N/A * This code is free software; you can redistribute it and/or modify it
2126N/A * under the terms of the GNU General Public License version 2 only, as
2126N/A * published by the Free Software Foundation.
2126N/A *
2126N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2126N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2126N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2126N/A * version 2 for more details (a copy is included in the LICENSE file that
2126N/A * accompanied this code).
2126N/A *
2126N/A * You should have received a copy of the GNU General Public License version
2126N/A * 2 along with this work; if not, write to the Free Software Foundation,
2126N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2126N/A *
2126N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2126N/A * or visit www.oracle.com if you need additional information or have any
2126N/A * questions.
2126N/A */
2126N/A
2126N/A/**
2126N/A * @test
2126N/A * @bug 7017746
2126N/A * @summary Regression : C2 compiler crash due to SIGSEGV in PhaseCFG::schedule_early()
2126N/A *
2126N/A * @run main/othervm -Xbatch Test
2126N/A */
2126N/A
2126N/Apublic class Test {
2126N/A
2126N/A int i;
2126N/A
2126N/A static int test(Test t, int a, int b) {
2126N/A int j = t.i;
2126N/A int x = a - b;
2126N/A if (a < b) x = x + j;
2126N/A return x - j;
2126N/A }
2126N/A
2126N/A public static void main(String args[]) {
2126N/A Test t = new Test();
2126N/A for (int n = 0; n < 1000000; n++) {
2126N/A int i = test(t, 1, 2);
2126N/A }
2126N/A }
2126N/A}
2126N/A