www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21735] New: [REG 2.093.1] Compiler segfaults when using a


          Issue ID: 21735
           Summary: [REG 2.093.1] Compiler segfaults when using a struct
                    with a copy constructor in an array
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: wolframw protonmail.com

void main()
    import std.stdio : writeln;

    struct Foo
        int i = 5;

        this(ref return scope Foo rhs)

    Foo[1] foo;
    writeln("foo: ", foo);

This crashes the compiler since version 2.093.1. It does not matter whether a
static array or a dynamic array is used.

Mar 19 2021