www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20044] New: Compiler segfault in Algebraic with

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

          Issue ID: 20044
           Summary: Compiler segfault in Algebraic with self-referential
                    array in templated struct
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: trishume gmail.com

https://run.dlang.io/is/Nio6z1

Reduced crashing case:

import std.variant;
struct While(T) { T[] body; }
alias Stmt = Algebraic!(While!(This));

Doesn't occur with inline This[] or when referenced as T* or T*[] instead of
T[].

--
Jul 12 2019