From: http://forum.dlang.org/thread/xupmxlqobvwvquznzdiw@forum.dlang.org Tweaked test case: struct sQueue(T) { struct sNode { T mfPayload = T.init; union { typeof(this)* mfPrev; shared(typeof(this)*) mfShPrev; } union { 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; }
I confirmed that this is a regression from 2.066.
https://github.com/D-Programming-Language/dmd/pull/4853
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/30edcc2664f243f86861aee2483dbb20ddc9a77a fix Issue 14853 - DMD segfaults with the cast from mutable struct new to shared https://github.com/D-Programming-Language/dmd/commit/6be38b76e5ce9dcb90886d1e18cdaada172c7393 Merge pull request #4853 from 9rnsr/fix14853 [REG2.066] Issue 14853 - DMD segfaults with the cast from mutable struct new to shared
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/30edcc2664f243f86861aee2483dbb20ddc9a77a fix Issue 14853 - DMD segfaults with the cast from mutable struct new to shared https://github.com/D-Programming-Language/dmd/commit/6be38b76e5ce9dcb90886d1e18cdaada172c7393 Merge pull request #4853 from 9rnsr/fix14853