www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Internal error: ../ztc/cgcod.c 1489

reply Kevin Bealer <Kevin_member pathlink.com> writes:
During compile:

Internal error: ../ztc/cgcod.c 1489

dmd version is dmd 0.121 on linux x86.

: int main()
: {
:     struct foo1 { int a; int b; int c; }
:     
:     class foo2 {
:         foo1[] x;
:         
:         foo1 fooret(foo1 foo2)
:         {
:             x.length = 9;
:             return x[0] = foo2; // Here
:
:             // x[0] = foo2; --- This version does not
:             // return x[0]; --- cause the error.
:         }
:     }
:     
:     return 0;
: }

On the line marked "Here", I get the error message stated above.

Changes that fix the problem:

1. Seperating the "=" and the "return" as shown.
2. Converting "struct foo1" into class foo1".

Kevin
Apr 24 2005
next sibling parent reply "Unknown W. Brackets" <unknown simplemachines.org> writes:
 :     class foo2 {
 :         foo1 fooret(foo1 foo2)
Why are both the class and the parameter named foo2? -[Unknown]
Apr 24 2005
parent Kevin Bealer <Kevin_member pathlink.com> writes:
In article <d4fgh6$5tn$1 digitaldaemon.com>, Unknown W. Brackets says...
 :     class foo2 {
 :         foo1 fooret(foo1 foo2)
Why are both the class and the parameter named foo2? -[Unknown]
That was unintentional on my part. But, I changed the class name to foo3 and I still see the internal error. Kevin
Apr 24 2005
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Bealer schrieb am Sun, 24 Apr 2005 07:03:40 +0000 (UTC):
 During compile:

 Internal error: ../ztc/cgcod.c 1489

 dmd version is dmd 0.121 on linux x86.

: int main()
: {
:     struct foo1 { int a; int b; int c; }
:     
:     class foo2 {
:         foo1[] x;
:         
:         foo1 fooret(foo1 foo2)
:         {
:             x.length = 9;
:             return x[0] = foo2; // Here
:
:             // x[0] = foo2; --- This version does not
:             // return x[0]; --- cause the error.
:         }
:     }
:     
:     return 0;
: }

 On the line marked "Here", I get the error message stated above.

 Changes that fix the problem:

 1. Seperating the "=" and the "return" as shown.
 2. Converting "struct foo1" into class foo1".

 Kevin
Added to DStress as http://dstress.kuehne.cn/run/bug_cgcod_1489_A.d http://dstress.kuehne.cn/run/bug_cgcod_1489_B.d http://dstress.kuehne.cn/run/bug_cgcod_1489_C.d http://dstress.kuehne.cn/run/bug_cgcod_1489_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbIBW3w+/yD4P9tIRAnCLAJ0bxU0QoL4Emp1OWsuzIEnAP+x1DQCgwsFJ rZesbxah1Hc2EMyX5qTFB9U= =IpGF -----END PGP SIGNATURE-----
Apr 24 2005