changeset 1067:e293e1b6aaaa

<thomas-dloop@kuehne.cn> 2006-07-02 news:bug-235-3@http.d.puremagic.com/issues/
author thomask
date Sun, 02 Jul 2006 15:45:08 +0000
parents c6b463bf409d
children d892c90166f0
files run/s/scope_14_A.d run/s/scope_14_B.d
diffstat 2 files changed, 74 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_14_A.d	Sun Jul 02 15:45:08 2006 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<thomas-dloop@kuehne.cn>
+// @date@	2006-07-02
+// @uri@	news:bug-235-3@http.d.puremagic.com/issues/
+
+module dstress.run.s.scope_14_A;
+
+int status;
+
+void foo(bool b){
+	if(b){
+		goto label;
+	}
+
+	status = 2;
+	scope(exit){
+		status--;
+	}
+
+label:
+	{
+	}
+}
+
+int main(char[][] args){
+	foo(args.length > 1000);
+
+	if(status != 1){
+		assert(0);
+	}
+
+	return 0;
+}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/scope_14_B.d	Sun Jul 02 15:45:08 2006 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<thomas-dloop@kuehne.cn>
+// @date@	2006-07-02
+// @uri@	news:bug-235-3@http.d.puremagic.com/issues/
+
+module dstress.run.s.scope_14_B;
+
+int status;
+
+void foo(bool b){
+	if(b){
+		goto label;
+	}
+
+	status = 2;
+	scope(exit){
+		status--;
+	}
+
+label:
+	{
+	}
+}
+
+int main(char[][] args){
+	foo(args.length < 1000);
+
+	if(status != 0){
+		assert(0);
+	}
+
+	return 0;
+}
+