October 11, 2020
https://issues.dlang.org/show_bug.cgi?id=21303

          Issue ID: 21303
           Summary: Segfault with -preview=dip1021 and -inline on trivial
                    std.socket code
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: mipri@minimaltype.com

The following reduced example of a TCP server segfaults with DMD64 D Compiler v2.094.1-beta.1 when compiled with *both* -inline and -preview=dip1021:

import std.socket : TcpSocket;
import std.stdio : writefln;

void main() {
    auto listener = new TcpSocket;
    auto client = listener.accept;
    writefln("Received connection from %s.", client.remoteAddress.toString);
}

--