Wed, 21 May 2014 10:56:41 -0700
Added tag jdk8u20-b15 for changeset 8c785f9bde6f
rasbold@801 | 1 | /* |
trims@1907 | 2 | * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
rasbold@801 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
rasbold@801 | 4 | * |
rasbold@801 | 5 | * This code is free software; you can redistribute it and/or modify it |
rasbold@801 | 6 | * under the terms of the GNU General Public License version 2 only, as |
rasbold@801 | 7 | * published by the Free Software Foundation. |
rasbold@801 | 8 | * |
rasbold@801 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
rasbold@801 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
rasbold@801 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
rasbold@801 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
rasbold@801 | 13 | * accompanied this code). |
rasbold@801 | 14 | * |
rasbold@801 | 15 | * You should have received a copy of the GNU General Public License version |
rasbold@801 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
rasbold@801 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
rasbold@801 | 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. |
rasbold@801 | 22 | */ |
rasbold@801 | 23 | |
rasbold@801 | 24 | /* |
rasbold@801 | 25 | * @test |
rasbold@801 | 26 | * @bug 6711100 |
rasbold@801 | 27 | * @summary 64bit fastdebug server vm crashes with assert(_base == Int,"Not an Int") |
rasbold@801 | 28 | * @run main/othervm -Xcomp -XX:CompileOnly=Test.<init> Test |
rasbold@801 | 29 | */ |
rasbold@801 | 30 | |
rasbold@801 | 31 | public class Test { |
rasbold@801 | 32 | |
rasbold@801 | 33 | static byte b; |
rasbold@801 | 34 | |
rasbold@801 | 35 | // The server compiler chokes on compiling |
rasbold@801 | 36 | // this method when f() is not inlined |
rasbold@801 | 37 | public Test() { |
rasbold@801 | 38 | b = (new byte[1])[(new byte[f()])[-1]]; |
rasbold@801 | 39 | } |
rasbold@801 | 40 | |
rasbold@801 | 41 | protected static int f() { |
rasbold@801 | 42 | return 1; |
rasbold@801 | 43 | } |
rasbold@801 | 44 | |
rasbold@801 | 45 | public static void main(String[] args) { |
rasbold@801 | 46 | try { |
rasbold@801 | 47 | Test t = new Test(); |
rasbold@801 | 48 | } catch (ArrayIndexOutOfBoundsException e) { |
rasbold@801 | 49 | } |
rasbold@801 | 50 | } |
rasbold@801 | 51 | } |
rasbold@801 | 52 | |
rasbold@801 | 53 |