← Back to index
|
Original Bugzilla link
Bug 15015 – Win64: interop with C/C++ fails if function return value is a struct of size 8
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2015-09-05T08:40:00Z
Last change time
2016-01-03T14:02:21Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0
by r.sagitario — 2015-09-05T08:40:31Z
Currently versioned out in the dmd test suite: // from cabi1.d struct Foo5 { int i, j; } extern (C) Foo5 ctest5(); void main() { Foo5 f5 = ctest5(); assert(f5.i == 0x12345678); assert(f5.j == 0x21436587); } // from cabi2.cpp struct Foo5 { int i, j; }; struct Foo5 ctest5() { struct Foo5 f; f.i = 0x12345678; f.j = 0x21436587; return f; } /// compile with x64 cl: cl /c cabi2.cpp dmd -m64 cabi1.cpp cabi2.obj ./cabi1 raises assertion failure.
Comment #1
by r.sagitario — 2015-09-05T08:44:58Z
https://github.com/D-Programming-Language/dmd/pull/5039
Comment #2
by github-bugzilla — 2015-11-05T22:34:38Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/0b3c6ec1a1b9f19cd998f4571d55cb9ff1798cd3
Merge pull request #5039 from rainers/issue_15015 fix Issue 15015 - Win64: interop with C/C++ fails if function return value is a struct of size 8
Comment #3
by github-bugzilla — 2016-01-03T14:02:21Z
Commit pushed to stable at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/0b3c6ec1a1b9f19cd998f4571d55cb9ff1798cd3
Merge pull request #5039 from rainers/issue_15015