www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Compiler/Optimizer bug

reply MicroWizard <MicroWizard_member pathlink.com> writes:
As I promised here is the root of an "old" bug discussed on D forum.
If you omit any one of the swithes or the 'private' word
or change 'p.length' to 'length' or '$' --> it compiles.

Best regards,
Tamas Nagy

DMD 0.137 Win32
Compile with switches:
dmd -c -release -inline -O dotted.d

Result:
Internal error: ..\ztc\cgcod.c 1489

dotted.d
<CODE>
class DP{
private:
void I(char[] p)
{
I(p[1..p.length]);
}
}
</CODE>
Nov 04 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

MicroWizard schrieb am 2005-11-04:
 As I promised here is the root of an "old" bug discussed on D forum.
 If you omit any one of the swithes or the 'private' word
 or change 'p.length' to 'length' or '$' --> it compiles.

 Best regards,
 Tamas Nagy

 DMD 0.137 Win32
 Compile with switches:
 dmd -c -release -inline -O dotted.d

 Result:
 Internal error: ..\ztc\cgcod.c 1489

 dotted.d
<CODE>
 class DP{
 private:
 void I(char[] p)
 {
 I(p[1..p.length]);
 }
 }
</CODE>
Added to DStress as http://dstress.kuehne.cn/compile/b/bug_cgcod_1497_A2.d http://dstress.kuehne.cn/compile/b/bug_cgcod_1497_B2.d http://dstress.kuehne.cn/compile/b/bug_cgcod_1497_C2.d http://dstress.kuehne.cn/compile/b/bug_cgcod_1497_D2.d http://dstress.kuehne.cn/compile/b/bug_cgcod_1497_E2.d http://dstress.kuehne.cn/compile/b/bug_cgcod_1497_F2.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDbs643w+/yD4P9tIRAss3AJ49S9T+LNeIC+Q7XQ3wPQnZV72iiQCg0Vin wjru2vLRwvSl83X4zfxIygY= =aG7w -----END PGP SIGNATURE-----
Nov 06 2005