[Issue 7591] New: Wrong const-folding comparisons involving complex nans

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 26 08:07:27 PST 2012


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

           Summary: Wrong const-folding comparisons involving complex nans
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: yebblies at gmail.com
        ReportedBy: yebblies at gmail.com


--- Comment #0 from yebblies <yebblies at gmail.com> 2012-02-27 03:07:26 EST ---
When compiled with -inline, the backend will attempt to const-fold the
comparison and get the wrong result.

cfloat get() { return cfloat.nan; }

void main()
{
    assert(!(get() == 0));
}

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