www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14853] New: DMD segfaults with the cast from mutable struct


          Issue ID: 14853
           Summary: DMD segfaults with the cast from mutable struct new to
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: k.hara.pg gmail.com

From: http://forum.dlang.org/thread/xupmxlqobvwvquznzdiw forum.dlang.org

Tweaked test case:

struct sQueue(T)
    struct sNode
        T mfPayload = T.init;
                   typeof(this)*  mfPrev;
            shared(typeof(this)*) mfShPrev;
                   typeof(this)*  mfNext;
            shared(typeof(this)*) mfShNext;

    sNode mfRoot;

    void pfPut(T v, sNode* r = null)
        shared n = new sNode(v);    // problem!

void main()
    auto b1 = new sQueue!uint;

Jul 31 2015