changeset 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents 3d75bc76b7ae
children 45e89f20882a
files run/a/array_initialization_34_A.d run/a/array_initialization_34_B.d run/a/array_initialization_34_C.d run/a/array_initialization_34_D.d run/a/array_initialization_34_E.d
diffstat 5 files changed, 148 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_34_A.d	Thu Feb 21 15:20:08 2008 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<mariusmuja@gmail.com>
+// @date@	2007-08-04
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1398
+// @desc@	[Issue 1398] New: GDC doesn't generate correct code
+
+module dstress.run.a.array_initialization_34_A;
+
+class B{
+	A[] ab;
+}
+
+class A{
+	A[] aa;
+
+	void bar(){
+		aa = new A[10];
+		if(10 != aa.length){
+			assert(0);
+		}
+	}
+}
+
+int main(){
+	A a = new A;
+	a.bar();
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_34_B.d	Thu Feb 21 15:20:08 2008 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<mariusmuja@gmail.com>
+// @date@	2007-08-04
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1398
+// @desc@	[Issue 1398] New: GDC doesn't generate correct code
+
+module dstress.run.a.array_initialization_34_B;
+
+class B{
+	A ab;
+}
+
+class A{
+	A[] aa;
+
+	void bar(){
+		aa = new A[10];
+		if(10 != aa.length){
+			assert(0);
+		}
+	}
+}
+
+int main(){
+	A a = new A;
+	a.bar();
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_34_C.d	Thu Feb 21 15:20:08 2008 +0000
@@ -0,0 +1,30 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<mariusmuja@gmail.com>
+// @date@	2007-08-04
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1398
+// @desc@	[Issue 1398] New: GDC doesn't generate correct code
+
+module dstress.run.a.array_initialization_34_C;
+
+class B{
+}
+
+class A{
+	A[] aa;
+
+	void bar(){
+		aa = new A[10];
+		if(10 != aa.length){
+			assert(0);
+		}
+	}
+}
+
+int main(){
+	A a = new A;
+	a.bar();
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_34_D.d	Thu Feb 21 15:20:08 2008 +0000
@@ -0,0 +1,27 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<mariusmuja@gmail.com>
+// @date@	2007-08-04
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1398
+// @desc@	[Issue 1398] New: GDC doesn't generate correct code
+
+module dstress.run.a.array_initialization_34_D;
+
+class A{
+	A[] aa;
+
+	void bar(){
+		aa = new A[10];
+		if(10 != aa.length){
+			assert(0);
+		}
+	}
+}
+
+int main(){
+	A a = new A;
+	a.bar();
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/array_initialization_34_E.d	Thu Feb 21 15:20:08 2008 +0000
@@ -0,0 +1,29 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	<mariusmuja@gmail.com>
+// @date@	2007-08-04
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1398
+// @desc@	[Issue 1398] New: GDC doesn't generate correct code
+
+module dstress.run.a.array_initialization_34_E;
+
+A[] ab;
+
+class A{
+	A[] aa;
+
+	void bar(){
+		aa = new A[10];
+		if(10 != aa.length){
+			assert(0);
+		}
+	}
+}
+
+int main(){
+	A a = new A;
+	a.bar();
+	return 0;
+}