Segfault while compiling simple program

Saurabh Das via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 16 02:07:38 PST 2015


On Wednesday, 16 December 2015 at 09:38:24 UTC, Ali Çehreli wrote:
> On 12/16/2015 01:26 AM, Saurabh Das wrote:
>> struct xlref
>> {
>>      ushort rwFirst;
>>      ushort rwLast;
>>      ubyte colFirst;
>>      ubyte colLast;
>> }
>>
>> struct xlmref
>> {
>>      ushort count;
>>      xlref reflist;
>> }
>>
>> Mac OS X (dmd 2.069.0)
>> ===================
>> dmd  dprob.d
>> Segmentation fault: 11
>
> Compiler bug. Please report at
>
>   https://issues.dlang.org/
>
> Changing the order of the members of xlmref seems to be a 
> workaround:
>
> struct xlmref
> {
>     xlref reflist;
>     ushort count;
> }
>
> Ali

We are using it to communicate with Excel, so swapping it is not 
an option.

I'll report it as a compiler bug. In the meantime, this is a 
workaround worked for me:

struct xlref
{
      ushort rwFirst;
      ushort rwLast;
      ubyte[2] cols;
}



More information about the Digitalmars-d-learn mailing list