www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - compiler crash on template

reply David Medlock <noone nowhere.com> writes:
For some reason my last posting of this message isn't showing up....

// begin code

class Foo(T)
{
   void    add( T val )
   {
     uint test = 1;
     if ( test > val ) return;
   }
}

struct MyStruct
{
   int   value;
}

void main( char[][] args )
{
   Foo!(MyStruct)  foo = new Foo!(MyStruct);
}



(DMD 0.131, Windows XP Pro)

I get the 'dmd.exe has encountered a problem and needs to close' .. gp 
fault.
---------- Capture Output ----------
 "C:\dmd\bin\dmd.exe" -debug -c "E:\proj\temp\error.d"

and 'MyStruct'
 Terminated with exit code -1073741819.

Sep 27 2005
parent =?ISO-8859-1?Q?Thomas_K=FChne?= <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Medlock schrieb:
 For some reason my last posting of this message isn't showing up....
 
 // begin code
 
 class Foo(T)
 {
   void    add( T val )
   {
     uint test = 1;
     if ( test > val ) return;
   }
 }
 
 struct MyStruct
 {
   int   value;
 }
 
 void main( char[][] args )
 {
   Foo!(MyStruct)  foo = new Foo!(MyStruct);
 }
 
 
 
 (DMD 0.131, Windows XP Pro)
 
 I get the 'dmd.exe has encountered a problem and needs to close' .. gp
 fault.
 ---------- Capture Output ----------
 "C:\dmd\bin\dmd.exe" -debug -c "E:\proj\temp\error.d"

and 'MyStruct'
 Terminated with exit code -1073741819.


Added to DStress as http://dstress.kuehne.cn/run/b/bug_expression_5818_A.d http://dstress.kuehne.cn/run/b/bug_expression_5818_B.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_C.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_D.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_E.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_F.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_G.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_H.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDOca/3w+/yD4P9tIRAoTeAKCyxMY4eQWTEE8lXC5lKYw7Y38OygCeLBGn gC+scox5PUI+w83SjXzCEc8= =NCiW -----END PGP SIGNATURE-----
Sep 27 2005