www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Internal error: ../ztc/cgcod.c 562

reply Tiago Gasiba <tiago.gasiba gmail.com> writes:
The following code produces an internal error.
Any commented line also produces the same error.
Part 2 of the code is basically the same function, except that internally a
cast to cfloat is done.

Best Regards,
Tiago Gasiba

<snip>
template _func1( T : T[] ){
  void _func1( T[] data ) {
    data[0] /= cast(cdouble)data.length;
  }
}

alias _func1!(float[])   func1;
//alias _func1!(int[])   func1;
//alias _func1!(uint[])  func1;
//alias _func1!(long[])   func1;
//alias _func1!(ulong[])   func1;
//alias _func1!(char[])   func1;
//alias _func1!(byte[])   func1;




/*****************************************************/

/*
template _func2( T : T[] ){
  void _func2( T[] data ) {
    data[0] /= cast(cfloat)data.length;
  }
}

alias _func2!(int[])   func2;
//alias _func2!(uint[])  func2;
//alias _func2!(long[])   func2;
//alias _func2!(ulong[])   func2;
//alias _func2!(char[])   func2;
//alias _func2!(byte[])   func2;
*/
<snip>


-- 
Tiago Gasiba (M.Sc.) - http://www.gasiba.de
Everything should be made as simple as possible, but not simpler.
Nov 28 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tiago Gasiba schrieb am 2005-11-28:
 The following code produces an internal error.
 Any commented line also produces the same error.
 Part 2 of the code is basically the same function, except that internally a
cast to cfloat is done.

 Best Regards,
 Tiago Gasiba

<snip>
 template _func1( T : T[] ){
   void _func1( T[] data ) {
     data[0] /= cast(cdouble)data.length;
   }
 }

 alias _func1!(float[])   func1;
 //alias _func1!(int[])   func1;
 //alias _func1!(uint[])  func1;
 //alias _func1!(long[])   func1;
 //alias _func1!(ulong[])   func1;
 //alias _func1!(char[])   func1;
 //alias _func1!(byte[])   func1;




 /*****************************************************/

 /*
 template _func2( T : T[] ){
   void _func2( T[] data ) {
     data[0] /= cast(cfloat)data.length;
   }
 }

 alias _func2!(int[])   func2;
 //alias _func2!(uint[])  func2;
 //alias _func2!(long[])   func2;
 //alias _func2!(ulong[])   func2;
 //alias _func2!(char[])   func2;
 //alias _func2!(byte[])   func2;
 */
<snip>
Added to DStress as http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_A1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_A2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_A3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_B1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_B2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_B3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_C1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_C2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_C3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_D1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_D2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_D3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_E1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_E2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_E3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_F1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_F2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_F3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_G1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_G2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_G3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_H1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_H2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_H3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_I1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_I2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_I3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_J1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_J2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_J3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_K1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_K2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_K3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_L1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_L2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_L3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_M1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_M2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_M3.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_N1.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_N2.d http://dstress.kuehne.cn/nocompile/b/bug_cgcod_562_N3.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_O1.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_O2.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_O3.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_P1.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_P2.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_P3.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_Q1.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_Q2.d http://dstress.kuehne.cn/run/b/bug_cgcod_562_Q3.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDk0QL3w+/yD4P9tIRAqJ+AJ4hIfl3AcphRdE/Fe65KSkMbVOJAACeJcgW p08CabAzVxVUmU48DEa8KXQ= =tFy8 -----END PGP SIGNATURE-----
Dec 04 2005