Browse Source

* copy also pushedparasize when copying call nodes, resolves #30923

git-svn-id: trunk@34885 -
florian 8 years ago
parent
commit
9bff3ac624
3 changed files with 36 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 1 0
      compiler/ncal.pas
  3. 34 0
      tests/webtbs/tw30923.pp

+ 1 - 0
.gitattributes

@@ -15254,6 +15254,7 @@ tests/webtbs/tw30706.pp svneol=native#text/plain
 tests/webtbs/tw3073.pp svneol=native#text/plain
 tests/webtbs/tw3073.pp svneol=native#text/plain
 tests/webtbs/tw3082.pp svneol=native#text/plain
 tests/webtbs/tw3082.pp svneol=native#text/plain
 tests/webtbs/tw3083.pp svneol=native#text/plain
 tests/webtbs/tw3083.pp svneol=native#text/plain
+tests/webtbs/tw30923.pp svneol=native#text/pascal
 tests/webtbs/tw3093.pp svneol=native#text/plain
 tests/webtbs/tw3093.pp svneol=native#text/plain
 tests/webtbs/tw3101.pp svneol=native#text/plain
 tests/webtbs/tw3101.pp svneol=native#text/plain
 tests/webtbs/tw3104.pp svneol=native#text/plain
 tests/webtbs/tw3104.pp svneol=native#text/plain

+ 1 - 0
compiler/ncal.pas

@@ -1755,6 +1755,7 @@ implementation
         n.procdefinition:=procdefinition;
         n.procdefinition:=procdefinition;
         n.typedef := typedef;
         n.typedef := typedef;
         n.callnodeflags := callnodeflags;
         n.callnodeflags := callnodeflags;
+        n.pushedparasize:=pushedparasize;
         if assigned(callinitblock) then
         if assigned(callinitblock) then
           n.callinitblock:=tblocknode(callinitblock.dogetcopy)
           n.callinitblock:=tblocknode(callinitblock.dogetcopy)
         else
         else

+ 34 - 0
tests/webtbs/tw30923.pp

@@ -0,0 +1,34 @@
+program project1;
+
+{$mode objfpc}{$H+}
+
+Type
+  QStringListH = class(TObject) end;
+
+function QStringList_size(handle: QStringListH): Integer; cdecl;
+begin
+  Result := 1;
+end;
+
+procedure QStringList_at(handle: QStringListH; retval: PWideString; i: Integer); cdecl;
+begin
+
+end;
+
+procedure Test;
+Var
+  AQStringListH : QStringListH;
+  AWideString : WideString;
+  I : Integer;
+begin
+  For I := 0 To QStringList_size(AQStringListH) - 1  do
+    QStringList_at(AQStringListH, @AWideString, i);
+end;
+
+Var
+  I : Integer;
+begin
+  Test;
+  I := 0;
+end.
+