www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11565] New: [Optimizer] Zeroes out the higher 32bits of register in ?: expression

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: dmitry.olsh gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh 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: -------
Nov 20 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11565


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, wrong-code
                 CC|                            |yebblies gmail.com
         AssignedTo|nobody puremagic.com        |yebblies gmail.com


--- Comment #1 from yebblies <yebblies gmail.com> 2013-11-21 16:54:35 EST ---
https://github.com/D-Programming-Language/dmd/pull/2841

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 20 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11565



--- Comment #2 from github-bugzilla puremagic.com 2013-11-22 13:36:11 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/87b9cf934f45a90333daa0d999ba602dd2ef6a81
Fix Issue 11565 - [Optimizer] Zeroes out the higher 32bits of register in ?:
expression

https://github.com/D-Programming-Language/dmd/commit/056cc7d45d687fda12e263205b54e17a5afc1fad
Merge pull request #2841 from yebblies/issue11565

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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 22 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11565



--- Comment #3 from github-bugzilla puremagic.com 2013-11-22 13:38:38 PST ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/4f8561cc12c22ec5741c5ab967946f8b6aabd844
Merge pull request #2841 from yebblies/issue11565

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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 22 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11565


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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