Mercurial > hg > truffle
comparison test/compiler/6646019/Test.java @ 129:c0939256690b
6646019: array subscript expressions become top() with -d64
Summary: stop compilation after negative array allocation
Reviewed-by: never, jrose
author | rasbold |
---|---|
date | Thu, 24 Apr 2008 14:02:13 -0700 |
parents | |
children | b0fe4deeb9fb 51ae48d8072f |
comparison
equal
deleted
inserted
replaced
127:e0bd2e08e3d0 | 129:c0939256690b |
---|---|
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 */ | |
23 | |
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 */ | |
30 | |
31 | |
32 public class Test { | |
33 final static int i = 2076285318; | |
34 long l = 2; | |
35 short s; | |
36 | |
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 } | |
46 | |
47 private void test() { | |
48 l = 5; | |
49 l = (new short[(byte)-2])[(byte)(l = i)]; | |
50 } | |
51 } |