<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-08-01 13:27 GMT+09:00 sdv via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Saturday, 1 August 2015 at 04:26:45 UTC, sdv wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
import std.stdio;<br>
import core.memory;<br>
<br>
struct sQueue(T)<br>
{<br>
struct sNode<br>
{<br>
T mfPayload = T.init;<br>
union{<br>
typeof(this)* mfPrev;<br>
shared(typeof(this)*) mfShPrev;<br>
}<br>
union{<br>
typeof(this)* mfNext;<br>
shared(typeof(this)*) mfShNext;<br>
}<br>
}<br>
<br>
<br>
//shared(sQueueNode) mfRoot;<br>
sNode mfRoot;<br>
<br>
void pfPut(T v,sNode* r = null)<br>
{<br>
if(r is null) r = &this.mfRoot;<br>
shared auto n = new sNode(v);<br>
<br>
}<br>
<br>
}<br>
<br>
<br>
int main(string[] argv)<br>
{<br>
auto b1 = new sQueue!uint;<br>
<br>
<br>
<br>
writeln("Hello D-World!");<br>
writeln("Hello D-World!");<br>
writeln("Hello D-World!");<br>
return 0;<br>
}<br>
</blockquote>
<br></div></div>
DMD32 D Compiler v2.067.1<br></blockquote><div><br></div><div>Do you mean the dmd segfault when you compile the code?</div><div>Yes, it's a compiler bug. I filed the issue in bugzilla:</div><div><br></div><div><a href="https://issues.dlang.org/show_bug.cgi?id=14853">https://issues.dlang.org/show_bug.cgi?id=14853</a><br></div><div><br></div><div>Kenji Hara</div></div></div></div>