Thu, 11 Apr 2013 21:45:21 -0700
Added tag hs25-b28 for changeset 6d88a566d369
rasbold@564 | 1 | /* |
trims@1907 | 2 | * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
kvn@688 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
rasbold@564 | 4 | * |
kvn@688 | 5 | * This code is free software; you can redistribute it and/or modify it |
kvn@688 | 6 | * under the terms of the GNU General Public License version 2 only, as |
kvn@688 | 7 | * published by the Free Software Foundation. |
rasbold@564 | 8 | * |
kvn@688 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
kvn@688 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
kvn@688 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
kvn@688 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
kvn@688 | 13 | * accompanied this code). |
rasbold@564 | 14 | * |
kvn@688 | 15 | * You should have received a copy of the GNU General Public License version |
kvn@688 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
kvn@688 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
rasbold@564 | 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@564 | 22 | */ |
rasbold@564 | 23 | |
rasbold@564 | 24 | /* |
rasbold@564 | 25 | * @test |
rasbold@564 | 26 | * @bug 6646019 |
rasbold@564 | 27 | * @summary array subscript expressions become top() with -d64 |
rasbold@564 | 28 | * @run main/othervm -Xcomp -XX:CompileOnly=Test.test Test |
rasbold@564 | 29 | */ |
rasbold@564 | 30 | |
rasbold@564 | 31 | |
rasbold@564 | 32 | public class Test { |
rasbold@564 | 33 | final static int i = 2076285318; |
rasbold@564 | 34 | long l = 2; |
rasbold@564 | 35 | short s; |
rasbold@564 | 36 | |
rasbold@564 | 37 | public static void main(String[] args) { |
rasbold@564 | 38 | Test t = new Test(); |
rasbold@564 | 39 | try { t.test(); } |
rasbold@564 | 40 | catch (Throwable e) { |
rasbold@564 | 41 | if (t.l != 5) { |
rasbold@564 | 42 | System.out.println("Fails: " + t.l + " != 5"); |
rasbold@564 | 43 | } |
rasbold@564 | 44 | } |
rasbold@564 | 45 | } |
rasbold@564 | 46 | |
rasbold@564 | 47 | private void test() { |
rasbold@564 | 48 | l = 5; |
rasbold@564 | 49 | l = (new short[(byte)-2])[(byte)(l = i)]; |
rasbold@564 | 50 | } |
rasbold@564 | 51 | } |