www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21303] New: Segfault with -preview=dip1021 and -inline on


          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);

Oct 11 2020