diff run/s/synchronized_03_F.d @ 1448:b0b70172c68b

[Issue 1091] Wrong size reserved for critical sections Frits van Bommel <fvbommel@wxs.nl> 2007-04-02 http://d.puremagic.com/issues/show_bug.cgi?id=1091
author thomask
date Wed, 04 Apr 2007 20:29:08 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/synchronized_03_F.d	Wed Apr 04 20:29:08 2007 +0000
@@ -0,0 +1,32 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Frits van Bommel <fvbommel@wxs.nl>
+// @date@	2007-04-02
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1091
+// @desc@	[Issue 1091] Wrong size reserved for critical sections
+
+module dstress.run.s.synchronized_03_F;
+
+long x;
+
+void foo(long a){
+	x += a * a;
+}
+
+void bar(Object a, Object b){
+	synchronized(a){
+		synchronized(b){
+			foo(3L);
+		}
+	}
+}
+int main(){
+	bar(new Object(), new Object());
+
+	if(9L != x){
+		assert(0);
+	}
+	return 0;
+}