http://d.puremagic.com/issues/show_bug.cgi?id=9099
--- Comment #1 from Puneet Goel <[email protected]> 2012-11-30 06:48:25 PST --- This is related. The result printed out by the code on my Ubuntu amd64 machine is 42 4294967296 Upto version dmd-2.059, it correctly prints 42 and 42. When the "this" constructor for Foo is commented out again the results are correctly printed out as 42 and 42. // import core.atomic; struct Foo { public ulong _s = 0; // atomicLoad gives out wrong value when this (constructor) is defined public this (ulong s) { this._s = s; } } auto foo () { import std.stdio; shared static Foo bar; bar._s = 42; writeln(bar._s); atomicStore(bar, bar); shared Foo frop = atomicLoad(bar); writeln(frop._s); return frop; } void main() { foo(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
