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
*** Issue 16105 has been marked as a duplicate of this issue. ***
Comment #3 by cauterite — 2016-08-19T21:50:07Z
*** This issue has been marked as a duplicate of issue 9813 ***
Comment #4 by github-bugzilla — 2016-10-09T12:50:00Z
Commits pushed to stable at https://github.com/dlang/phoboshttps://github.com/dlang/phobos/commit/3bed8dfd33dffb40dc2fbb5850ebc26bccc3888f
fix gdc-dmd test - remove the workound for Issue 15316
- we can't really solve Issue 15316 w/ signaling NaNs
b/c any optimization, copying et.al. might turn signaling into
quiet NaNs, therefor we want to solve Issue 15316 by switching
Float.init to use quiet NaNs
- the workaround depends on a specific dmd bug (see #6163)
that looses SNaNs when writing struct initializers but keeps
them for Float.init
- this workaround might not be portable to GDC/LDC and
will easily break w/ slightly different dmd optimizations
(it's responsible for the test failure of the gdc-built dmd)
- this PR will reopen https://issues.dlang.org/show_bug.cgi?id=11135
this partially reverts commit 0efa1d3bf92bcaa6c4a99cad0b574185a537906a
https://github.com/dlang/phobos/commit/50a264628f411d41acec522e0f70fe6677ffd0c8
Merge pull request #4844 from MartinNowak/revert_3797
fix gdc-dmd test - remove the workound for Issue 15316
Comment #5 by github-bugzilla — 2016-10-09T19:40:08Z