Thread overview
GDC: internal compiler error
Nov 07, 2005
Tiago Gasiba
Nov 07, 2005
Tiago Gasiba
Nov 13, 2005
Thomas Kuehne
Nov 13, 2005
Thomas Kuehne
November 07, 2005
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.
November 07, 2005
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.
November 13, 2005
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


November 13, 2005
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