According to the documentation:
When a routine is declared within the scope of a procedure or function, it is said to be nested. In this case, an additional invisible parameter is passed to the nested routine. This additional parameter is the frame pointer address of the parent routine. This permits the nested routine to access the local variables and parameters of the calling routine.
In the situation when the nested routine doesn't access any parameter or local variable of the calling routine, would there be a problem if the produced code would be as if the routine was not nested? The frame pointer parameter occupies space with no benefit and it looks like it might block a useful CPU register(look at variable "f" in the following nested_yes and nested_no functions).
Here is an example where function1 and function2 do the same thing except for the fact that one of them calls a nested routine and the other one doesn't:
program Project1;
function nested_no(a,b,c,d,e,f:sizeint):sizeint;
begin
if a+b+c+d+e+f>0 then result:=-1 else result:=0;
end;
function function1(a,b,c,d,e,f:sizeint):sizeint;
begin
result:=nested_no(a,b,a,b,a,b);
end;
function function2(a,b,c,d,e,f:sizeint):sizeint;
function nested_yes(a,b,c,d,e,f:sizeint):sizeint;
begin
if a+b+c+d+e+f>0 then result:=-1 else result:=0;
end;
begin
result:=nested_yes(a,b,a,b,a,b);
end;
begin
writeln(function1(round(random),round(random),round(random),round(random),round(random),round(random)));
writeln(function2(round(random),round(random),round(random),round(random),round(random),round(random)));
end.
I attach FPC's produced code(look at variable "f" in the following nested_yes and nested_no functions)