[Issue 710] New: compiler assertion failure w/ templates

Thomas Kuehne thomas-dloop at kuehne.cn
Tue Dec 26 04:28:19 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-12-22:
> http://d.puremagic.com/issues/show_bug.cgi?id=710

> The following code:
>
> static int _i=0;
>
> template NEXT(int idx) {
>   const NEXT = idx;
> }
>
> interface Protocol {
>   static ubyte HELO = NEXT!(_i++);
> }
>
> void main() { }
>
> causes the Win32 dmd compiler to error with the following:
>
> C:\>dmd z.d
> global.errors = 0, gag = 0
> 00936D54 ++ type=int e1=00962524 e2=00936D78
>   00962524 var var=_i type=int
>   00936D78 1 type=int
> Assertion failure: '0' on line 775 in file 'expression.c'
>
> abnormal program termination

old test cases triggering this bug:
http://dstress.kuehne.cn/nocompile/t/template_30_A.d
http://dstress.kuehne.cn/nocompile/t/template_30_B.d
http://dstress.kuehne.cn/nocompile/t/template_30_C.d
http://dstress.kuehne.cn/nocompile/t/template_30_D.d
http://dstress.kuehne.cn/nocompile/t/template_30_E.d

Added to DStress as
http://dstress.kuehne.cn/nocompile/t/template_52_A.d
http://dstress.kuehne.cn/nocompile/t/template_52_B.d
http://dstress.kuehne.cn/nocompile/t/template_52_C.d

Thomas


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

iD8DBQFFkRVfLK5blCcjpWoRApmlAKCDwuIf+Bir4HdhOYttjgVEzDRhjwCfYtzj
M4+AgaYSuepXbre+GDxIgm0=
=f07X
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-bugs mailing list