Mercurial > hg > graal-compiler
annotate test/compiler/6901572/Test.java @ 1149:0579c695832f
Merge
author | ysr |
---|---|
date | Sat, 09 Jan 2010 09:01:41 -0800 |
parents | 8b22f86d1740 |
children | c18cbe5936b8 |
rev | line source |
---|---|
1083
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
1 /* |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
4 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
8 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
13 * accompanied this code). |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
14 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
18 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
21 * have any questions. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
22 */ |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
23 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
24 /** |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
25 * @test |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
26 * @bug 6901572 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
27 * @summary JVM 1.6.16 crash on loops: assert(has_node(i),"") |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
28 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
29 * @run main/othervm Test |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
30 */ |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
31 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
32 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
33 public class Test { |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
34 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
35 public static void main(String[] args) { |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
36 for (int i = 0; i < 2; i++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
37 NestedLoop(); |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
38 } |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
39 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
40 public static long NestedLoop() { |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
41 final int n = 50; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
42 long startTime = System.currentTimeMillis(); |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
43 int x = 0; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
44 for(int a = 0; a < n; a++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
45 for(int b = 0; b < n; b++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
46 for(int c = 0; c < n; c++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
47 for(int d = 0; d < n; d++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
48 for(int e = 0; e < n; e++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
49 for(int f = 0; f < n; f++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
50 x++; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
51 long stopTime = System.currentTimeMillis(); |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
52 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
53 return stopTime - startTime; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
54 } |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
55 } |