Internal error: e2ir.c 736 dmd0.147

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Feb 23 23:32:04 PST 2006


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

BCS schrieb am 2006-02-19:
> In article <e42jc3-6h7.ln1 at birke.kuehne.cn>, Thomas Kuehne says...
>>
>>> I ask because case B and D should compile (or fail gracefully) and from what I 
>>> can tell they are marked as "shouldn't compile".
>>
>>>> http://dstress.kuehne.cn/nocompile/t/template_29_B.d
>>>> http://dstress.kuehne.cn/nocompile/t/template_29_D.d
>>
>>For clarification I've replaced "uint" with "size_t".
>>
>>I'm not sure how they could succeed to compile without memory exhaustion and
>>thus fail gracefully at compile time(hence: nocompile).
>>
>>Granted, an advanced compiler might be able to compile the given tests
>>with 2 instead of size_t.max template instance - not sure how to fool
>>that kind of compiler.
>>
>>Thomas
>>
> My point is that they are both (in theory) legal code and thus should nether
> crash DMD or generate a syntax error. In reality, nether can be expected to
> actually compile, but DMD should give some sort of rational error message like
> "Internal template recursion limit exceeded: Quitting".

The nocompile category of DStress includes several cases that are
syntactically correct but lead to resource exhaustion. The compiler is
expected to handle those cases gracefully.

Thomas


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

iD8DBQFD/rii3w+/yD4P9tIRAsb5AJ9BDmgKvHIotjvn+reHygRYOid5SwCg0DB3
9YvuxC79IxG+hn3PgQI9tuA=
=9tG0
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list