D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19227 - S.init is S.init failing for struct with float member
Summary: S.init is S.init failing for struct with float member
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-05 19:40 UTC by Nathan S.
Modified: 2018-12-16 20:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nathan S. 2018-09-05 19:40:22 UTC
On top of that there seems to be discrepancies between different platforms, seen in https://github.com/dlang/phobos/pull/6693 passing the autotests on some platforms but not others.

---
struct S
{
    float f;
}

void main()
{
    static assert(S.init is S.init); // Fails on code.dlang.io.
    assert(S.init is S.init); // Passes if you comment out the above.
}
---
Comment 1 Nathan S. 2018-10-30 20:39:27 UTC
Updated this to a regression after discovering that this worked with DMD 2.063.
Comment 2 Walter Bright 2018-12-13 09:01:27 UTC
https://github.com/dlang/dmd/pull/9073
Comment 3 github-bugzilla 2018-12-16 20:53:38 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/e1dce1a8f90aee8c6922ca12cba99cc22c4122f8
fix Issue 19227 - S.init is S.init failing for struct with float member

https://github.com/dlang/dmd/commit/883b5930856756045d86382fa1eb28e205dd438e
Merge pull request #9073 from WalterBright/fix19227

fix Issue 19227 - S.init is S.init failing for struct with float member