jdk

Форк
0
/
TestNestedSynchronize.java 
238 строк · 7.4 Кб
1
/*
2
 * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
 *
5
 * This code is free software; you can redistribute it and/or modify it
6
 * under the terms of the GNU General Public License version 2 only, as
7
 * published by the Free Software Foundation.
8
 *
9
 * This code is distributed in the hope that it will be useful, but WITHOUT
10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
 * version 2 for more details (a copy is included in the LICENSE file that
13
 * accompanied this code).
14
 *
15
 * You should have received a copy of the GNU General Public License version
16
 * 2 along with this work; if not, write to the Free Software Foundation,
17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
 *
19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
 * or visit www.oracle.com if you need additional information or have any
21
 * questions.
22
 */
23

24
/**
25
 * @test
26
 * @bug 8322996
27
 * @summary Ensure no assert error in C2 with deeply nested synchronize
28
 *          statements.
29
 * @run main/othervm -XX:CompileCommand=compileonly,compiler.locks.TestNestedSynchronize::test
30
 *                   -Xcomp
31
 *                   compiler.locks.TestNestedSynchronize
32
 */
33

34
package compiler.locks;
35

36
public class TestNestedSynchronize {
37

38
    public static void main(String[] args) {
39
        test();
40
    }
41

42
    public static void test() {
43

44
        synchronized (TestNestedSynchronize.class) {
45
        synchronized (TestNestedSynchronize.class) {
46
        synchronized (TestNestedSynchronize.class) {
47
        synchronized (TestNestedSynchronize.class) {
48
        synchronized (TestNestedSynchronize.class) {
49
        synchronized (TestNestedSynchronize.class) {
50
        synchronized (TestNestedSynchronize.class) {
51
        synchronized (TestNestedSynchronize.class) {
52
        synchronized (TestNestedSynchronize.class) {
53
        synchronized (TestNestedSynchronize.class) {
54
        synchronized (TestNestedSynchronize.class) {
55
        synchronized (TestNestedSynchronize.class) {
56
        synchronized (TestNestedSynchronize.class) {
57
        synchronized (TestNestedSynchronize.class) {
58
        synchronized (TestNestedSynchronize.class) {
59
        synchronized (TestNestedSynchronize.class) {
60
        synchronized (TestNestedSynchronize.class) {
61
        synchronized (TestNestedSynchronize.class) {
62
        synchronized (TestNestedSynchronize.class) {
63
        synchronized (TestNestedSynchronize.class) {
64
        synchronized (TestNestedSynchronize.class) {
65
        synchronized (TestNestedSynchronize.class) {
66
        synchronized (TestNestedSynchronize.class) {
67
        synchronized (TestNestedSynchronize.class) {
68
        synchronized (TestNestedSynchronize.class) {
69
        synchronized (TestNestedSynchronize.class) {
70
        synchronized (TestNestedSynchronize.class) {
71
        synchronized (TestNestedSynchronize.class) {
72
        synchronized (TestNestedSynchronize.class) {
73
        synchronized (TestNestedSynchronize.class) {
74
        synchronized (TestNestedSynchronize.class) {
75
        synchronized (TestNestedSynchronize.class) {
76
        synchronized (TestNestedSynchronize.class) {
77
        synchronized (TestNestedSynchronize.class) {
78
        synchronized (TestNestedSynchronize.class) {
79
        synchronized (TestNestedSynchronize.class) {
80
        synchronized (TestNestedSynchronize.class) {
81
        synchronized (TestNestedSynchronize.class) {
82
        synchronized (TestNestedSynchronize.class) {
83
        synchronized (TestNestedSynchronize.class) {
84
        synchronized (TestNestedSynchronize.class) {
85
        synchronized (TestNestedSynchronize.class) {
86
        synchronized (TestNestedSynchronize.class) {
87
        synchronized (TestNestedSynchronize.class) {
88
        synchronized (TestNestedSynchronize.class) {
89
        synchronized (TestNestedSynchronize.class) {
90
        synchronized (TestNestedSynchronize.class) {
91
        synchronized (TestNestedSynchronize.class) {
92
        synchronized (TestNestedSynchronize.class) {
93
        synchronized (TestNestedSynchronize.class) {
94
        synchronized (TestNestedSynchronize.class) {
95
        synchronized (TestNestedSynchronize.class) {
96
        synchronized (TestNestedSynchronize.class) {
97
        synchronized (TestNestedSynchronize.class) {
98
        synchronized (TestNestedSynchronize.class) {
99
        synchronized (TestNestedSynchronize.class) {
100
        synchronized (TestNestedSynchronize.class) {
101
        synchronized (TestNestedSynchronize.class) {
102
        synchronized (TestNestedSynchronize.class) {
103
        synchronized (TestNestedSynchronize.class) {
104
        synchronized (TestNestedSynchronize.class) {
105
        synchronized (TestNestedSynchronize.class) {
106
        synchronized (TestNestedSynchronize.class) {
107
        synchronized (TestNestedSynchronize.class) {
108
        synchronized (TestNestedSynchronize.class) {
109
        synchronized (TestNestedSynchronize.class) {
110
        synchronized (TestNestedSynchronize.class) {
111
        synchronized (TestNestedSynchronize.class) {
112
        synchronized (TestNestedSynchronize.class) {
113
        synchronized (TestNestedSynchronize.class) {
114
        synchronized (TestNestedSynchronize.class) {
115
        synchronized (TestNestedSynchronize.class) {
116
        synchronized (TestNestedSynchronize.class) {
117
        synchronized (TestNestedSynchronize.class) {
118
        synchronized (TestNestedSynchronize.class) {
119
        synchronized (TestNestedSynchronize.class) {
120
        synchronized (TestNestedSynchronize.class) {
121
        synchronized (TestNestedSynchronize.class) {
122
        synchronized (TestNestedSynchronize.class) {
123
        synchronized (TestNestedSynchronize.class) {
124
        synchronized (TestNestedSynchronize.class) {
125
        synchronized (TestNestedSynchronize.class) {
126
        synchronized (TestNestedSynchronize.class) {
127
        synchronized (TestNestedSynchronize.class) {
128
        synchronized (TestNestedSynchronize.class) {
129
        synchronized (TestNestedSynchronize.class) {
130
        synchronized (TestNestedSynchronize.class) {
131
        synchronized (TestNestedSynchronize.class) {
132
        synchronized (TestNestedSynchronize.class) {
133
        synchronized (TestNestedSynchronize.class) {
134
        synchronized (TestNestedSynchronize.class) {
135
        synchronized (TestNestedSynchronize.class) {
136
        synchronized (TestNestedSynchronize.class) {
137
        synchronized (TestNestedSynchronize.class) {
138
        synchronized (TestNestedSynchronize.class) {
139
        synchronized (TestNestedSynchronize.class) {
140

141
        }
142
        }
143
        }
144
        }
145
        }
146
        }
147
        }
148
        }
149
        }
150
        }
151
        }
152
        }
153
        }
154
        }
155
        }
156
        }
157
        }
158
        }
159
        }
160
        }
161
        }
162
        }
163
        }
164
        }
165
        }
166
        }
167
        }
168
        }
169
        }
170
        }
171
        }
172
        }
173
        }
174
        }
175
        }
176
        }
177
        }
178
        }
179
        }
180
        }
181
        }
182
        }
183
        }
184
        }
185
        }
186
        }
187
        }
188
        }
189
        }
190
        }
191
        }
192
        }
193
        }
194
        }
195
        }
196
        }
197
        }
198
        }
199
        }
200
        }
201
        }
202
        }
203
        }
204
        }
205
        }
206
        }
207
        }
208
        }
209
        }
210
        }
211
        }
212
        }
213
        }
214
        }
215
        }
216
        }
217
        }
218
        }
219
        }
220
        }
221
        }
222
        }
223
        }
224
        }
225
        }
226
        }
227
        }
228
        }
229
        }
230
        }
231
        }
232
        }
233
        }
234
        }
235
        }
236
        }
237
    }
238
}
239

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.