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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to