Browse Source

* Fixed bug introduced by r7667. Do not release pushed return value be callee for cdecl on win32. It fixes error3 of bug #9098.

git-svn-id: trunk@7734 -
yury 18 years ago
parent
commit
93e72c2079
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/i386/cgcpu.pas

+ 3 - 1
compiler/i386/cgcpu.pas

@@ -310,7 +310,9 @@ unit cgcpu;
                 (not use_fixed_stack)  then
                 (not use_fixed_stack)  then
          begin
          begin
            { complex return values are removed from stack in C code PM }
            { complex return values are removed from stack in C code PM }
-           if paramanager.ret_in_param(current_procinfo.procdef.returndef,
+           { but not on win32 }
+           if (target_info.system <> system_i386_win32) and
+              paramanager.ret_in_param(current_procinfo.procdef.returndef,
                                        current_procinfo.procdef.proccalloption) then
                                        current_procinfo.procdef.proccalloption) then
              list.concat(Taicpu.Op_const(A_RET,S_W,sizeof(aint)))
              list.concat(Taicpu.Op_const(A_RET,S_W,sizeof(aint)))
            else
            else