[Issue 17237] New: Wrong alignment of 256-bit and 512-bit vectors

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 1 14:10:24 PST 2017


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

          Issue ID: 17237
           Summary: Wrong alignment of 256-bit and 512-bit vectors
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

Target field alignment returned by GDC (and probably LDC too) is being
overwritten/ignored by the frontend if it considers it wrong from an x86
standpoint.

Here's one example that affects both DMD and GDC for different reasons.

---
struct vec_struct {
    bool b2;
    struct {
        bool b;
        int8 field;
    }
}

static assert(vec_struct.b.offsetof == 32);     // Fails, offset == 8
static assert(vec_struct.field.offsetof == 64); // Fails, offset == 40 !!!
---

--


More information about the Digitalmars-d-bugs mailing list