[Issue 4782] core.atomic.atomicLoad broken for floating point

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 4 12:42:39 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4782


David Simcha <dsimcha at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|atomicOp!"+=" hangs with    |core.atomic.atomicLoad
                   |floating point              |broken for floating point


--- Comment #1 from David Simcha <dsimcha at yahoo.com> 2010-10-04 12:42:16 PDT ---
I looked into this one a little.  The root cause is actually that atomicLoad is
broken for floating point values.  Floating point values are supposed to be
returned in floating point registers, not x86 registers.  Here's an example
demonstrating this issue.

import std.stdio;

void main() {
    double foo = 2;
    writeln(atomicLoad!(msync.raw)(foo)); // -nan
}

// Copy/paste core.atomic here and remove module declaration, since atomic load
is private.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list