www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15316] New: struct float fields not correctly initialised on

https://issues.dlang.org/show_bug.cgi?id=15316

          Issue ID: 15316
           Summary: struct float fields not correctly initialised on x64
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: cauterite gmail.com

http://dpaste.dzfl.pl/547374e4d630

    struct A {
        float floo;
    };

    void main() {
        A x = A.init;
        assert(x is x.init); // okay

        A y;
        assert(y is y.init); // fails
    };

Seems to work fine on x32, but fails on x64.
Note that x64 codegen uses SSE, while x32 doesn't.

doubles are also affected, but NOT reals: http://dpaste.dzfl.pl/b60adf79b79f

--
Nov 11 2015