Bug 14203 – Return of floating point values from extern(C++) member functions does not match dmc

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2015-02-20T02:37:29Z
Last change time
2020-09-03T07:14:52Z
Keywords
backend, C++, pull, wrong-code
Assigned to
No Owner
Creator
yebblies

Comments

Comment #0 by yebblies — 2015-02-20T02:37:29Z
struct C { float func() { return 0; } }; The C++ version of this code returns via the stack, but the D version returns in ST(0). One of these is obviously wrong. Same for double and real/long double, only on win32. I don't know if this is a bug in dmd or dmc. Anyone?
Comment #1 by github-bugzilla — 2015-02-20T05:49:57Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c73f7fefb952adbf8f5bfc28d872222854926033 Add workaround for issue 14203 https://github.com/D-Programming-Language/dmd/commit/b1ace291ac3078b55f9895177fe13b3f537874d9 Merge pull request #4423 from yebblies/floatworkaround [DDMD] Add workaround for issue 14203
Comment #2 by github-bugzilla — 2015-02-21T09:11:49Z
Comment #3 by github-bugzilla — 2015-06-17T21:00:57Z
Comment #4 by github-bugzilla — 2017-07-19T17:38:40Z
Comment #5 by dlang-bot — 2020-09-03T05:47:42Z
@WalterBright created dlang/dmd pull request #11675 "fix Issue 14203 - Return of floating point values from extern(C++) me…" fixing this issue: - fix Issue 14203 - Return of floating point values from extern(C++) member functions does not match dmc https://github.com/dlang/dmd/pull/11675
Comment #6 by dlang-bot — 2020-09-03T07:14:52Z
dlang/dmd pull request #11675 "fix Issue 14203 - Return of floating point values from extern(C++) me…" was merged into master: - 20a2eb3264270d7f42fc71237e3f42331afe9ed3 by Walter Bright: fix Issue 14203 - Return of floating point values from extern(C++) member functions does not match dmc https://github.com/dlang/dmd/pull/11675