[Issue 11565] New: [Optimizer] Zeroes out the higher 32bits of register in ?: expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 20 13:38:29 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11565

           Summary: [Optimizer] Zeroes out the higher 32bits of register
                    in ?: expression
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dmitry.olsh at gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-11-20 13:38:27 PST ---
This was a tricky devil to reduce. Marking as critical. 
Issue is specific to 64bit codegen:

size_t replicateBits(size_t val)
{
    return val ? size_t.max : 0;
}

unittest
{
    import std.conv;
    auto v = replicateBits(true);
    assert(v == size_t.max, text(v)); // fails with -O, prints 4294967295
}

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


More information about the Digitalmars-d-bugs mailing list