www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21911] New: dmd compiler segfault with std.container array,


          Issue ID: 21911
           Summary: dmd compiler segfault with std.container array,
                    templated struct, and static if
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ofsfmq+2y1kh9wla11eg grr.la

DMD32 D Compiler v2.096.0-dirty (Windows 10 x64)
Compiler crashes with "Segmentation fault" with the following code.

import std.container.array;
struct Foo(T) {
        struct Bar {
                T value;
        Array!Bar bar;
        this(string str) {
                static if (is(T == string)) {} // also fails with enum, float,
void main() {
        Foo!int f;

May 10 2021