* add parameter cleanup nodes to the call cleanup block (mantis #38316)

git-svn-id: trunk@48130 -
This commit is contained in:
Jonas Maebe 2021-01-10 15:47:27 +00:00
parent b7c519de81
commit 5c2303a76b
3 changed files with 25 additions and 0 deletions

1
.gitattributes vendored
View File

@ -18637,6 +18637,7 @@ tests/webtbs/tw38309.pp svneol=native#text/pascal
tests/webtbs/tw38310a.pp svneol=native#text/pascal
tests/webtbs/tw38310b.pp svneol=native#text/pascal
tests/webtbs/tw38310c.pp svneol=native#text/pascal
tests/webtbs/tw38316.pp svneol=native#text/plain
tests/webtbs/tw3833.pp svneol=native#text/plain
tests/webtbs/tw38337.pp svneol=native#text/plain
tests/webtbs/tw38339.pp svneol=native#text/plain

View File

@ -928,7 +928,10 @@ implementation
reused above) }
left:=ctemprefnode.create(paratemp);
end;
{ add the finish statements to the call cleanup block }
addstatement(finistat,ctempdeletenode.create(paratemp));
aktcallnode.add_done_statement(finiblock);
firstpass(fparainit);
firstpass(left);
end;

21
tests/webtbs/tw38316.pp Normal file
View File

@ -0,0 +1,21 @@
{ %opt=-gh }
program project1;
procedure P1(A: array of Integer);
begin
end;
procedure P2(A: array of Integer);
begin
P1(A);
end;
var
A: array [0..2] of Integer;
i: Integer;
begin
HaltOnNotReleased := true;
for i := 0 to 10 do
P2(A);
end.