[LLVMbugs] [Bug 5058] New: Support for sret the msvc++ way.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Sep 25 20:21:40 PDT 2009


           Summary: Support for sret the msvc++ way.
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ofv at wanadoo.es
                CC: llvmbugs at cs.uiuc.edu

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


Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list