www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - BUG: compiler GPF on template code

reply Sean Kelly <sean f4.ca> writes:
C:\code\d\bugs>type 144_1.d
// this code causes a compiler GPF

template fn( T ) {
     void fn() {
     }
}

template fn( T ) {
     void fn( T val ) {
     }
}

void main() {
     fn!(int)( 1 );
}
C:\code\d\bugs>dmd 144_1
144_1.d(8):
C:\code\d\bugs>
Jan 24 2006
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Kelly schrieb am 2006-01-24:
 C:\code\d\bugs>type 144_1.d
 // this code causes a compiler GPF

 template fn( T ) {
      void fn() {
      }
 }

 template fn( T ) {
      void fn( T val ) {
      }
 }

 void main() {
      fn!(int)( 1 );
 }
 C:\code\d\bugs>dmd 144_1
 144_1.d(8):
 C:\code\d\bugs>
I can't reproduce this with DMD-0.144 on Linux. Added to DStress as http://dstress.kuehne.cn/nocompile/t/template_25_A.d http://dstress.kuehne.cn/nocompile/t/template_25_B.d http://dstress.kuehne.cn/nocompile/t/template_struct_07.d http://dstress.kuehne.cn/nocompile/t/template_class_17.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFD10kK3w+/yD4P9tIRAvxBAJ0VqvwQOHLPb9GzwrSb/bofIE3O7ACfSmXu w2chMmEy5CJ66Rj5wBQOL0I= =2iCs -----END PGP SIGNATURE-----
Jan 25 2006