changeset 1437:e489e020a55d

r7385@birke: tk | 2007-03-29 15:34:13 +0200 [Issue 1058] DMD hangs with 100% CPU - member function returning forward-referenced struct before constructor <vlasov@scatt.com> 2007-03-12 http://d.puremagic.com/issues/show_bug.cgi?id=1058
author thomask
date Sat, 31 Mar 2007 08:24:58 +0000
parents a44492981ddb
children ca5b18e46ec7
files run/f/forward_reference_19_A.d run/f/forward_reference_19_B.d run/f/forward_reference_19_C.d run/f/forward_reference_19_D.d run/f/forward_reference_19_E.d
diffstat 5 files changed, 182 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/f/forward_reference_19_A.d	Sat Mar 31 08:24:58 2007 +0000
@@ -0,0 +1,34 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<vlasov@scatt.com>
+// @date@	2007-03-12
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1058
+// @desc@	[Issue 1058] DMD hangs with 100% CPU - member function returning forward-referenced struct before constructor
+
+module dstress.run.f.forward_reference_19_A;
+
+class A{
+	B x;
+
+	B b(){
+		return x;
+	}
+}
+
+struct B{
+	int dummy;
+}
+
+int main(){
+	A a = new A();
+	B b;
+	b.dummy = 0x12EF34AB;
+	a.x = b;
+	if(0x12EF34AB != a.b().dummy){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/f/forward_reference_19_B.d	Sat Mar 31 08:24:58 2007 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<vlasov@scatt.com>
+// @date@	2007-03-12
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1058
+// @desc@	[Issue 1058] DMD hangs with 100% CPU - member function returning forward-referenced struct before constructor
+
+module dstress.run.f.forward_reference_19_B;
+
+class A{
+	B x;
+
+	B b(){
+		return x;
+	}
+
+	this(){
+	}
+}
+
+struct B{
+	int dummy;
+}
+
+int main(){
+	A a = new A();
+	B b;
+	b.dummy = 0x12EF34AB;
+	a.x = b;
+	if(0x12EF34AB != a.b().dummy){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/f/forward_reference_19_C.d	Sat Mar 31 08:24:58 2007 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<vlasov@scatt.com>
+// @date@	2007-03-12
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1058
+// @desc@	[Issue 1058] DMD hangs with 100% CPU - member function returning forward-referenced struct before constructor
+
+module dstress.run.f.forward_reference_19_C;
+
+class A{
+	B x;
+
+	this(){
+	}
+
+	B b(){
+		return x;
+	}
+}
+
+struct B{
+	int dummy;
+}
+
+int main(){
+	A a = new A();
+	B b;
+	b.dummy = 0x12EF34AB;
+	a.x = b;
+	if(0x12EF34AB != a.b().dummy){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/f/forward_reference_19_D.d	Sat Mar 31 08:24:58 2007 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<vlasov@scatt.com>
+// @date@	2007-03-12
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1058
+// @desc@	[Issue 1058] DMD hangs with 100% CPU - member function returning forward-referenced struct before constructor
+
+module dstress.run.f.forward_reference_19_D;
+
+struct B{
+	int dummy;
+}
+
+class A{
+	B x;
+
+	this(){
+	}
+
+	B b(){
+		return x;
+	}
+}
+
+int main(){
+	A a = new A();
+	B b;
+	b.dummy = 0x12EF34AB;
+	a.x = b;
+	if(0x12EF34AB != a.b().dummy){
+		assert(0);
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/f/forward_reference_19_E.d	Sat Mar 31 08:24:58 2007 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<vlasov@scatt.com>
+// @date@	2007-03-12
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1058
+// @desc@	[Issue 1058] DMD hangs with 100% CPU - member function returning forward-referenced struct before constructor
+
+module dstress.run.f.forward_reference_19_E;
+
+struct B{
+	int dummy;
+}
+
+class A{
+	B x;
+
+	B b(){
+		return x;
+	}
+	
+	this(){
+	}
+}
+
+int main(){
+	A a = new A();
+	B b;
+	b.dummy = 0x12EF34AB;
+	a.x = b;
+	if(0x12EF34AB != a.b().dummy){
+		assert(0);
+	}
+
+	return 0;
+}