Closed
Description
Bugzilla Link | 5058 |
Resolution | WORKSFORME |
Resolved on | Jun 18, 2012 20:00 |
Version | trunk |
OS | Windows XP |
Blocks | llvm/llvm-bugzilla-archive#12477 |
CC | @AaronBallman,@asl,@tritao |
Extended Description
Contrary to gcc, on msvc++ is the caller the responsible of freeing the stack space used by the sret pointer parameter.
Right now if LLVM code calls a function compiled with msvc++ that returns a struct, the application will crash due to the unbalanced stack (if the signature of the external function contains sret. If no sret is used and the address of the return struct is passed as a regular parameter, the call works).
There are other differences on sret handling among gcc and msvc++. Those are listed on page 20 of