[Issue 14853] New: DMD segfaults with the cast from mutable struct new to shared
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 31 21:54:22 PDT 2015
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: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
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;
}
--
More information about the Digitalmars-d-bugs
mailing list