mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-22 14:09:13 +02:00
* 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:
parent
51493d673e
commit
a4dfa3b4fd
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
18
tests/webtbs/tw9107.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user