1448
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Frits van Bommel <fvbommel@wxs.nl>
|
|
6 // @date@ 2007-04-02
|
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1091
|
|
8 // @desc@ [Issue 1091] Wrong size reserved for critical sections
|
|
9
|
|
10 module dstress.run.s.synchronized_03_F;
|
|
11
|
|
12 long x;
|
|
13
|
|
14 void foo(long a){
|
|
15 x += a * a;
|
|
16 }
|
|
17
|
|
18 void bar(Object a, Object b){
|
|
19 synchronized(a){
|
|
20 synchronized(b){
|
|
21 foo(3L);
|
|
22 }
|
|
23 }
|
|
24 }
|
|
25 int main(){
|
|
26 bar(new Object(), new Object());
|
|
27
|
|
28 if(9L != x){
|
|
29 assert(0);
|
|
30 }
|
|
31 return 0;
|
|
32 }
|