www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Internal error with complex numbers

The smallest possible error-causing code:

int calc()
{
 creal C,Cj;
 real y1,x1;

 C = x1 + y1*1i + Cj;

 return 1;
}

Compilers gives
Internal error: ..\ztc\cg87.c 1235
with these combinations:
C = Cj + 1i*y1 + x1;
C = y1*1i + Cj + x1;

but these work:
C = x1 + y1*1i + Cj;
C = 1i*y1 + x1 + Cj;

without x1 there is allways internal error
for both
C = 1i*y1 + Cj;
C = Cj + 1i*y1;
May 01 2004