www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19685] New: Nested aggregate overlaps not detected

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

          Issue ID: 19685
           Summary: Nested aggregate overlaps not detected
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

Regression introduced by https://github.com/dlang/dmd/pull/9288

kinke writes:

some overlapping fields in the following example apparently don't get their
`VarDeclaration.overlapped` flag set:


struct SWithUnion
{
    char c;
    S nested;

    union
    {
        struct { ubyte ub = 6; ushort us = 33; align(8) ulong ul_dummy = void;
ulong last = 123; }
        struct { uint ui1; uint ui2 = 84; ulong ul = 666; }
    }
}

--
Feb 18 2019