瀏覽代碼

* Fixed another placed where chained paralocs where not being processed.

git-svn-id: trunk@7845 -
daniel 18 年之前
父節點
當前提交
75af9f2a4d
共有 1 個文件被更改,包括 19 次插入14 次删除
  1. 19 14
      compiler/cgobj.pas

+ 19 - 14
compiler/cgobj.pas

@@ -3664,7 +3664,7 @@ implementation
       var
         hsym : tsym;
         href : treference;
-        paraloc : tcgparalocation;
+        paraloc : Pcgparalocation;
       begin
         { calculate the parameter info for the procdef }
         if not procdef.has_paraloc_info then
@@ -3676,20 +3676,25 @@ implementation
         if not(assigned(hsym) and
                (hsym.typ=paravarsym)) then
           internalerror(200305251);
-        paraloc:=tparavarsym(hsym).paraloc[callerside].location^;
-        case paraloc.loc of
-          LOC_REGISTER:
-            a_op_const_reg(list,OP_SUB,paraloc.size,ioffset,paraloc.register);
-          LOC_REFERENCE:
+        paraloc:=tparavarsym(hsym).paraloc[callerside].location;
+        while paraloc<>nil do
+          with paraloc^ do
             begin
-               { offset in the wrapper needs to be adjusted for the stored
-                 return address }
-               reference_reset_base(href,paraloc.reference.index,paraloc.reference.offset+sizeof(aint));
-               a_op_const_ref(list,OP_SUB,paraloc.size,ioffset,href);
-            end
-          else
-            internalerror(200309189);
-        end;
+              case loc of
+                LOC_REGISTER:
+                  a_op_const_reg(list,OP_SUB,size,ioffset,register);
+                LOC_REFERENCE:
+                  begin
+                    { offset in the wrapper needs to be adjusted for the stored
+                      return address }
+                    reference_reset_base(href,reference.index,reference.offset+sizeof(aint));
+                    a_op_const_ref(list,OP_SUB,size,ioffset,href);
+                  end
+                else
+                  internalerror(200309189);
+              end;
+              paraloc:=next;
+            end;
       end;