[Issue 16651] New: atomicOp!"-="(ulong, uint) = wrong result/codegen

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Oct 30 16:35:16 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16651

          Issue ID: 16651
           Summary: atomicOp!"-="(ulong, uint) = wrong result/codegen
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: 2krnk at gmx.net

wrong result/codegen for atomicOp!"-="(ulong, uint) using DMD -m64. tested on
win64 only, using DMD-2.071.2. problem does not occur with DMD -m32 or
ldc2-1.1.0-b3 -m64.

-----

version(DigitalMars)version(D_LP64){
    import std.stdio    : writeln;
    import core.atomic    : atomicOp;

    shared ulong foo = 2;
    uint bar = 1;
    atomicOp!"-="( foo, bar );
    writeln( "foo = ", foo );    // foo = 4294967297
}

--


More information about the Digitalmars-d-bugs mailing list