Thread overview
Internal error: ../ztc/cgcod.c 1489
Apr 24, 2005
Kevin Bealer
Apr 24, 2005
Kevin Bealer
Apr 25, 2005
Thomas Kuehne
April 24, 2005
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


April 24, 2005
> :     class foo2 {

> :         foo1 fooret(foo1 foo2)

Why are both the class and the parameter named foo2?

-[Unknown]
April 24, 2005
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



April 25, 2005
-----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-----