comparison test/compiler/6695810/Test.java @ 163:885ed790ecf0

6695810: null oop passed to encode_heap_oop_not_null Summary: fix several problems in C2 related to Escape Analysis and Compressed Oops. Reviewed-by: never, jrose
author kvn
date Wed, 21 May 2008 10:45:07 -0700
parents
children b0fe4deeb9fb 51ae48d8072f
comparison
equal deleted inserted replaced
162:8aa010f60e0f 163:885ed790ecf0
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 /*
26 * @test
27 * @bug 6695810
28 * @summary null oop passed to encode_heap_oop_not_null
29 * @run main/othervm -Xbatch Test
30 */
31
32 public class Test {
33 Test _t;
34
35 static void test(Test t1, Test t2) {
36 if (t2 != null)
37 t1._t = t2;
38
39 if (t2 != null)
40 t1._t = t2;
41 }
42
43 public static void main(String[] args) {
44 Test t = new Test();
45 for (int i = 0; i < 50; i++) {
46 for (int j = 0; j < 100; j++) {
47 test(t, t);
48 }
49 test(t, null);
50 }
51 for (int i = 0; i < 10000; i++) {
52 test(t, t);
53 }
54 test(t, null);
55 }
56 }