[Issue 5578] New: GDC: struct is wrong size when real data type used.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 14 14:47:55 PST 2011
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 at puremagic.com
ReportedBy: brad.lanam.temp at gmail.com
--- Comment #0 from Brad L <brad.lanam.temp at gmail.com> 2011-02-14 14:45:22 PST ---
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: -------
More information about the Digitalmars-d-bugs
mailing list