[Issue 16466] New: Alignment of reals inside structs on 32 bit OSX should be 16, not 8

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Sep 4 21:56:08 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16466

          Issue ID: 16466
           Summary: Alignment of reals inside structs on 32 bit OSX should
                    be 16, not 8
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

The following fails on OSX 32 bit:
------------------------------
import core.stdc.stdio;

struct S
{
    real r;
}

int main()
{
    real r;
    printf("S.alignof: %x, r.alignof: %x\n", S.alignof, r.alignof);
    assert(S.alignof == r.alignof);
    return 0;
}
-------------------------------
S.alignof: 8, r.alignof: 10
core.exception.AssertError at test.d(13): Assertion failure

--


More information about the Digitalmars-d-bugs mailing list