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

           Summary: Inconsistent equality with array of NaNs between
                    runtime and CTFE
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: minor
          Priority: P2
         Component: druntime
        AssignedTo: nob...@puremagic.com
        ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-05-14 07:33:25 PDT ---
In CTFE, an array of NaN will not be equal to itself. However, this return
'true' in the runtime:

-----------------------------------------------
bool f() {
    float[] h = [float.nan];
    float[] i = [float.nan];
    return h == i;
}
void main() {
    static assert(!f());    // ctfe is OK
    assert(!f());           // runtime asserts
}
-----------------------------------------------

The CTFE and runtime result should be consistent.

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

Reply via email to