Mercurial > hg > truffle
annotate 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 |
rev | line source |
---|---|
129
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
1 /* |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
2 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
3 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
4 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
5 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
6 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
7 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
8 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
9 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
10 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
11 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
12 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
13 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
14 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
15 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
16 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
17 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
18 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
19 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
20 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
21 * |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
22 */ |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
23 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
24 /* |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
25 * @test |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
26 * @bug 6646019 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
27 * @summary array subscript expressions become top() with -d64 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
28 * @run main/othervm -Xcomp -XX:CompileOnly=Test.test Test |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
29 */ |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
30 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
31 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
32 public class Test { |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
33 final static int i = 2076285318; |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
34 long l = 2; |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
35 short s; |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
36 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
37 public static void main(String[] args) { |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
38 Test t = new Test(); |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
39 try { t.test(); } |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
40 catch (Throwable e) { |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
41 if (t.l != 5) { |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
42 System.out.println("Fails: " + t.l + " != 5"); |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
43 } |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
44 } |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
45 } |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
46 |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
47 private void test() { |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
48 l = 5; |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
49 l = (new short[(byte)-2])[(byte)(l = i)]; |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
50 } |
c0939256690b
6646019: array subscript expressions become top() with -d64
rasbold
parents:
diff
changeset
|
51 } |