www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - GDC: internal compiler error

reply Tiago Gasiba <tiago.gasiba gmail.com> writes:
The following code produces an internal compuler error with GDC 0.16:

<snip>
void foo( cdouble[] data ) {
  data[0] -= data[0].im;
}
<snip>

gdc bug_gdc.d
bug_gdc.d: In function 'foo':
bug_gdc.d:2: internal compiler error: Segmentation fault

Tiago

-- 
Tiago Gasiba (M.Sc.) - http://www.gasiba.de
Everything should be made as simple as possible, but not simpler.
Nov 07 2005
next sibling parent reply Tiago Gasiba <tiago.gasiba gmail.com> writes:
Tiago Gasiba schrieb:

 The following code produces an internal compuler error with GDC 0.16:
 
 <snip>
 void foo( cdouble[] data ) {
   data[0] -= data[0].im;
 }
 <snip>
 
 gdc bug_gdc.d
 bug_gdc.d: In function 'foo':
 bug_gdc.d:2: internal compiler error: Segmentation fault
 
 Tiago
 

The following code also crashes the compiler, although I think both bugs are related: <snip> void foo( cdouble[] data ) { data[0] /= cast(double)data.length; } <snip> this is a typecast problem, because the following code compiles correctly: <snip> void foo( cdouble[] data ) { data[0] /= cast(cdouble)data.length; } <snip> Tiago -- Tiago Gasiba (M.Sc.) - http://www.gasiba.de Everything should be made as simple as possible, but not simpler.
Nov 07 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tiago Gasiba schrieb am 2005-11-07:
 Tiago Gasiba schrieb:

 The following code produces an internal compuler error with GDC 0.16:
 
 <snip>
 void foo( cdouble[] data ) {
   data[0] -= data[0].im;
 }
 <snip>
 
 gdc bug_gdc.d
 bug_gdc.d: In function 'foo':
 bug_gdc.d:2: internal compiler error: Segmentation fault
 
 Tiago
 

The following code also crashes the compiler, although I think both bugs are related: <snip> void foo( cdouble[] data ) { data[0] /= cast(double)data.length; } <snip> this is a typecast problem, because the following code compiles correctly: <snip> void foo( cdouble[] data ) { data[0] /= cast(cdouble)data.length; } <snip>

Added to DStress as http://dstress.kuehne.cn/run/c/cfloat_05_A.d http://dstress.kuehne.cn/run/c/cfloat_05_B.d http://dstress.kuehne.cn/run/c/cfloat_05_C.d http://dstress.kuehne.cn/run/c/cdouble_04_A.d http://dstress.kuehne.cn/run/c/cdouble_04_B.d http://dstress.kuehne.cn/run/c/cdouble_04_C.d http://dstress.kuehne.cn/run/c/creal_29_A.d http://dstress.kuehne.cn/run/c/creal_29_B.d http://dstress.kuehne.cn/run/c/creal_29_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDd32y3w+/yD4P9tIRAk6wAJ9SUeb2+WT4fFyK67g/5C3VlCBb1gCdEwgr RYISwzLKRoGnHB0faUU07eg= =msTw -----END PGP SIGNATURE-----
Nov 12 2005
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tiago Gasiba schrieb am 2005-11-07:
 The following code produces an internal compuler error with GDC 0.16:

<snip>
 void foo( cdouble[] data ) {
   data[0] -= data[0].im;
 }
<snip>

 gdc bug_gdc.d
 bug_gdc.d: In function 'foo':
 bug_gdc.d:2: internal compiler error: Segmentation fault

Added to DStress as http://dstress.kuehne.cn/run/c/cfloat_04_A.d http://dstress.kuehne.cn/run/c/cfloat_04_B.d http://dstress.kuehne.cn/run/c/cdouble_03_A.d http://dstress.kuehne.cn/run/c/cdouble_03_B.d http://dstress.kuehne.cn/run/c/creal_28_A.d http://dstress.kuehne.cn/run/c/creal_28_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDd3gD3w+/yD4P9tIRAgTVAKDN+6aErCGU6jv8rEkEIrE7EaF++ACdGWcU EOlreptZwgjkK1J8DdWTSJA= =9N9R -----END PGP SIGNATURE-----
Nov 12 2005