https://issues.dlang.org/show_bug.cgi?id=14853
Issue ID: 14853
Summary: DMD segfaults with the cast from mutable struct new to
shared
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ice
Severity: major
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
From: http://forum.dlang.org/thread/[email protected]
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;
}
--