[Issue 1145] New: bad codegen with ulong+float

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 14 12:19:55 PDT 2007


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

           Summary: bad codegen with ulong+float
           Product: DGCC aka GDC
           Version: 0.23
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: csantander619 at gmail.com


This doesn't pass the assert:
//-------
ulong foo ()
{
        return cast(ulong) (cast(ulong) 1176576512 + cast(float) -2);
}

void main ()
{
        assert(foo()==1176576510);
}
//-------


-- 



More information about the D.gnu mailing list