www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14606] New: [REG2.067.0] Bad code with -inline and structs

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

          Issue ID: 14606
           Summary: [REG2.067.0] Bad code with -inline and structs
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

Crashes on Windows with -m64 -inline:

////////// test.d /////////
struct S
{
    this(long stdTime)
    {
        _stdTime = stdTime;
    }

    long _stdTime;
}

S getS()
{
    S sysTime = S(0);
    return sysTime;
}

struct T
{
    this(string)
    {
        uint[3] arr;
        s = getS();
    }

    S s;
}

void main()
{
    T(null);
}
///////////////////////////

Introduced in https://github.com/D-Programming-Language/dmd/pull/3979

--
May 18 2015