Thread overview
Internal error: e2ir.c 736 dmd0.147
Feb 16, 2006
BCS
Feb 17, 2006
Thomas Kuehne
Feb 17, 2006
BCS
Feb 18, 2006
Thomas Kuehne
Feb 19, 2006
BCS
Feb 20, 2006
Walter Bright
Feb 24, 2006
Thomas Kuehne
February 16, 2006
DMD 0.147 w/ winXP

template foo(int i)
{
	const int bar = foo!(i).bar;
}

int main()
{
	return foo!(1).bar;
}
February 17, 2006
BCS schrieb am 2006-02-16:
> DMD 0.147 w/ winXP
>
> template foo(int i)
> {
> 	const int bar = foo!(i).bar;
> }
>
> int main()
> {
> 	return foo!(1).bar;
> }

Added to DStress as http://dstress.kuehne.cn/nocompile/t/template_29_A.d http://dstress.kuehne.cn/nocompile/t/template_29_B.d http://dstress.kuehne.cn/nocompile/t/template_29_C.d http://dstress.kuehne.cn/nocompile/t/template_29_D.d

Thomas


February 17, 2006
Where can I find a listing of the markup syntax for the test cases.
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".

Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> BCS schrieb am 2006-02-16:
> 
>>DMD 0.147 w/ winXP
>>
>>template foo(int i)
>>{
>>	const int bar = foo!(i).bar;
>>}
>>
>>int main()
>>{
>>	return foo!(1).bar;
>>}
> 
> 
> Added to DStress as
> http://dstress.kuehne.cn/nocompile/t/template_29_A.d
> http://dstress.kuehne.cn/nocompile/t/template_29_B.d
> http://dstress.kuehne.cn/nocompile/t/template_29_C.d
> http://dstress.kuehne.cn/nocompile/t/template_29_D.d
> 
> Thomas
> 
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iD8DBQFD9acd3w+/yD4P9tIRAhJ0AJ9zeaGW4+vYTpitwrLURlflebhoKACeIcME
> DA+DLkJys2Mc8kU1MRApens=
> =NriJ
> -----END PGP SIGNATURE-----
February 18, 2006
BCS schrieb am 2006-02-17:
> Where can I find a listing of the markup syntax for the test cases.
The basic classification is done via directories:
http://dstress.kuehne.cn/compile
http://dstress.kuehne.cn/nocompile
http://dstress.kuehne.cn/norun
http://dstress.kuehne.cn/run
http://dstress.kuehne.cn/undefined

If you are interrested in the tags used:
http://dstress.kuehne.cn/readme.html#testcase-settings
and
http://dstress.kuehne.cn/readme.html#sourcecode-metadata


> 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


February 19, 2006
In article <e42jc3-6h7.ln1@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".


February 20, 2006
"BCS" <BCS_member@pathlink.com> wrote in message news:dtb0fg$9pe$1@digitaldaemon.com...
> 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".

You're quite right.


February 24, 2006
BCS schrieb am 2006-02-19:
> In article <e42jc3-6h7.ln1@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