www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Array of struct with floating point members seg faults

reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
The following program seg faults:

struct Point
{
     double x;
     double y;
}

void main()
{
     Point[1] arr;
}

Any combination of float and double members exhibit the same bug as long 
as the size of the struct is 16.

I vaguely remember seeing a similar bug before but I can't find it in 
bugzilla.

Ali
Oct 26 2013
parent "Maxim Fomin" <maxim maxim-fomin.ru> writes:
On Saturday, 26 October 2013 at 17:46:31 UTC, Ali Çehreli wrote:
 The following program seg faults:

 struct Point
 {
     double x;
     double y;
 }

 void main()
 {
     Point[1] arr;
 }

 Any combination of float and double members exhibit the same 
 bug as long as the size of the struct is 16.

 I vaguely remember seeing a similar bug before but I can't find 
 it in bugzilla.

 Ali
http://d.puremagic.com/issues/show_bug.cgi?id=9969 http://d.puremagic.com/issues/show_bug.cgi?id=9449
Oct 26 2013