[Issue 5364] New: optimizer kills high dword of -1

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 22 21:55:55 PST 2010


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

           Summary: optimizer kills high dword of -1
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ellery-newcomer at utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2010-12-22 21:53:58 PST ---
dmd 2.050.

the code:

import std.stdio;
long b(long bmax){
    if(true){
    }
    if(bmax >= 0) bmax = -1;
    return bmax;
}

void main(){
    writeln(b(0));
}


the compilation:

dmd -O -inline test.d

the result:

4294967295

-- 
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