www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Internal error: ..\ztc\cgcod.c 1640

reply h3r3tic <foo bar.baz> writes:
(dmd .109, winxpsp2en)

Only takes place when compiling with -O

// ------------------------------------
// tmp.d
// ------------------------------------
struct foo
{
	int x, y, z;
}

void bar() {}

void main()
{
	foo[] arr;
	foreach(foo a; arr)
	{
		bar();
	}
}
// ------------------------------------

If the struct foo has 1, 2 or 4 'int' members, the error doesn't occur


Output :
parse     tmp
semantic  tmp
semantic2 tmp
semantic3 tmp
code      tmp
generating code for function 'bar'
generating code for function 'main'
Internal error: ..\ztc\cgcod.c 1640
Dec 24 2004
parent "Thomas Kuehne" <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Added to DStress as
http://dstress.kuehne.cn/run/bug_cgcod_1640_A.d
http://dstress.kuehne.cn/run/bug_cgcod_1640_B.d
http://dstress.kuehne.cn/run/bug_cgcod_1640_C.d
http://dstress.kuehne.cn/run/bug_cgcod_1640_D.d
http://dstress.kuehne.cn/run/bug_cgcod_1640_E.d
http://dstress.kuehne.cn/run/bug_cgcod_1640_F.d
http://dstress.kuehne.cn/run/bug_cgcod_1640_G.d

Thomas
-----BEGIN PGP SIGNATURE-----

iD4DBQFBzyx93w+/yD4P9tIRAnTFAJjYAyRry88jYrchKdvq/Wv5y1+OAJwNOBGl
o3XOEwE6dCRUq6t0kxN3Bg==
=zZip
-----END PGP SIGNATURE-----
Dec 26 2004