www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5578] New: GDC: struct is wrong size when real data type used.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5578

           Summary: GDC: struct is wrong size when real data type used.
           Product: D
           Version: D1
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: brad.lanam.temp gmail.com



---
Works w/dmd1, gdc2, dmd2.
Fails w/gdc1.

struct C_ST_y
 {
 double c;
 real d;
 } ;
//static assert ((C_ST_y).sizeof == 20);

void main () {
 writefln ("y:%d", C_ST_y.sizeof);
 writefln ("y.c:s:%d", C_ST_y.c.sizeof);
 writefln ("y.d:s:%d", C_ST_y.d.sizeof);
 writefln ("y.c:o:%d", C_ST_y.c.offsetof);
 writefln ("y.d:o:%d", C_ST_y.d.offsetof);
}

y:24
y.c:s:8
y.d:s:12
y.c:o:0
y.d:o:8

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 14 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5578




---
gdc (Ubuntu 1:1.046-4.3.4-3ubuntu1) 4.3.4

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 14 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5578


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |braddr puremagic.com
         Resolution|                            |INVALID



---
gdc bugs should be filed over here:

   https://bitbucket.org/goshawk/gdc/issues?status=new&status=open

The project home page:

   https://bitbucket.org/goshawk/gdc/wiki/Home

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 14 2011