mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 14:38:31 +02:00
Generate error if stack size of a procedure/function is bigger than globally allocated stack size
git-svn-id: trunk@36506 -
This commit is contained in:
parent
c1187a17cd
commit
8b6563bef2
@ -43,6 +43,8 @@ unit tgcpu;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
globals,
|
||||||
|
verbose,
|
||||||
cpubase;
|
cpubase;
|
||||||
|
|
||||||
{ ttgi8086 }
|
{ ttgi8086 }
|
||||||
@ -51,6 +53,8 @@ procedure ttgi8086.alloctemp(list: TAsmList; size: asizeint; alignment: shortint
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ref.segment:=NR_SS;
|
ref.segment:=NR_SS;
|
||||||
|
if abs(ref.offset) > globals.StackSize then
|
||||||
|
message(cg_e_localsize_too_big);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user