Test6795465.java revision 11707:ad7af1afda7a
1212795Sdim/* 2212795Sdim * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 3212795Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4212795Sdim * 5212795Sdim * This code is free software; you can redistribute it and/or modify it 6212795Sdim * under the terms of the GNU General Public License version 2 only, as 7212795Sdim * published by the Free Software Foundation. 8212795Sdim * 9212795Sdim * This code is distributed in the hope that it will be useful, but WITHOUT 10212795Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11212795Sdim * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12212795Sdim * version 2 for more details (a copy is included in the LICENSE file that 13212795Sdim * accompanied this code). 14212795Sdim * 15212795Sdim * You should have received a copy of the GNU General Public License version 16212795Sdim * 2 along with this work; if not, write to the Free Software Foundation, 17212795Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18212795Sdim * 19252723Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20212795Sdim * or visit www.oracle.com if you need additional information or have any 21212795Sdim * questions. 22212795Sdim * 23212795Sdim */ 24212795Sdim 25212795Sdim/** 26218893Sdim * @test 27212795Sdim * @bug 6795465 28212795Sdim * @summary Crash in assembler_sparc.cpp with client compiler on solaris-sparc 29212795Sdim * 30212795Sdim * @run main compiler.c1.Test6795465 31245431Sdim */ 32212795Sdim 33221345Sdimpackage compiler.c1; 34252723Sdim 35252723Sdimpublic class Test6795465 { 36252723Sdim static long var_1 = -1; 37252723Sdim 38252723Sdim void test() { 39252723Sdim long var_2 = var_1 * 1; 40252723Sdim var_2 = var_2 + (new byte[1])[0]; 41252723Sdim } 42252723Sdim 43212795Sdim public static void main(String[] args) { 44212795Sdim Test6795465 t = new Test6795465(); 45252723Sdim for (int i = 0; i < 200000; i++) { 46212795Sdim t.test(); 47212795Sdim } 48218893Sdim } 49212795Sdim} 50218893Sdim