Fri, 20 Jun 2008 08:44:58 -0700
Added tag jdk7-b29 for changeset 4f91c08b3e44
1 /*
2 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4 *
5 *
6 *
7 *
8 *
9 *
10 *
11 *
12 *
13 *
14 *
15 *
16 *
17 *
18 *
19 *
20 *
21 *
22 */
24 /*
25 * @test
26 * @bug 6646019
27 * @summary array subscript expressions become top() with -d64
28 * @run main/othervm -Xcomp -XX:CompileOnly=Test.test Test
29 */
32 public class Test {
33 final static int i = 2076285318;
34 long l = 2;
35 short s;
37 public static void main(String[] args) {
38 Test t = new Test();
39 try { t.test(); }
40 catch (Throwable e) {
41 if (t.l != 5) {
42 System.out.println("Fails: " + t.l + " != 5");
43 }
44 }
45 }
47 private void test() {
48 l = 5;
49 l = (new short[(byte)-2])[(byte)(l = i)];
50 }
51 }