[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #12 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/20ffec71c10a6f6e1651503dbb63cb1a7015cb20 fix issue 18928 - extern(C++) bad codegen on win64, wrong

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de --- Comment #11 from

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #10 from Manu --- Awesome sauce... sadly, for the immediate moment, I really need a fix in DMD >_< --

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #9 from ki...@gmx.net --- Well I gave it a shot and came up with an ugly hack which might just work, the first test results are promising: https://github.com/ldc-developers/ldc/pull/2720 --

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #8 from Manu --- So, probability of a prompt fix? Is this just a matter of not having correct information up front, or is the fix complicated by some issue? We have an evaluation here that's kinda been shattered by this, but a fast fix

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #7 from ki...@gmx.net --- Well it doesn't make too much sense, and even less so to do it for methods only; I rather think this is some legacy COM compatibility stuff. I did a few tests, and it really seems to be specific to methods

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #6 from Manu --- I recall a few years ago reading some article about MSVC breaking their ABI to guarantee RVO, because C++11 and move semantics and all that. I guess it needed to be efficient and therefore justified guaranteeing RVO

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 ki...@gmx.net changed: What|Removed |Added CC||ki...@gmx.net --- Comment #5 from

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #4 from Manu --- If you look at the disassembly of userdatabase.d, you'll see that the virtual function is not expecting the string in R8 where VC is putting it. It also doesn't appear to return via the RVO pointer(?) in RDX. The static

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-06-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #3 from Manu --- You'll have to relate these 2 lines to the .cpp file (attached) in main() Calling code in main(): // static call... auto x = addUser(test, "test"); 7FF74843C587 lea rdx,[string "test" (07FF748448D44h)]

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-05-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-05-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 --- Comment #1 from Manu --- I'm suspecting an issue with RVO. I think the MSC ABI has changed to guarantee RVO at some point in the last few years... but I'm not sure why the static call and virtual call appear to be called using different calling

[Issue 18928] extern(C++) bad codegen, wrong calling convention

2018-05-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18928 Manu changed: What|Removed |Added Keywords||C++, industry --