* fixed bug #9107: procedure which have pushed parameters in its body fails if only -OoSTACKFRAME switch is used.

+ test.

git-svn-id: trunk@7731 -
This commit is contained in:
yury 2007-06-19 12:09:11 +00:00
parent 51493d673e
commit a4dfa3b4fd
3 changed files with 20 additions and 1 deletions

1
.gitattributes vendored
View File

@ -8303,6 +8303,7 @@ tests/webtbs/tw9054.pp svneol=native#text/plain
tests/webtbs/tw9076.pp svneol=native#text/plain
tests/webtbs/tw9076a.pp svneol=native#text/plain
tests/webtbs/tw9085.pp svneol=native#text/plain
tests/webtbs/tw9107.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -2851,7 +2851,7 @@ implementation
begin
tcallparanode(left).det_registers;
if cs_opt_level1 in current_settings.optimizerswitches then
if (current_settings.optimizerswitches*[cs_opt_stackframe,cs_opt_level1]<>[]) then
begin
{ check for stacked parameters }
check_stack_parameters;

18
tests/webtbs/tw9107.pp Normal file
View File

@ -0,0 +1,18 @@
{%opt=-OoSTACKFRAME}
procedure Proc;
var
s:shortstring;
begin
s:='test';
if Copy(s,1,4)<>'test' then begin
writeln('Test failed!');
Halt(1);
end
else
writeln('Test OK.');
end;
begin
Proc;
end.