mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 16:59:12 +02:00
* only add the procdef's parentfpinitblock if there are any statements in it
* internalerror if we try to add a non-empty parentfpinitblock to a pure assembler routine git-svn-id: trunk@32740 -
This commit is contained in:
parent
5a8c151a72
commit
31bd38c45b
@ -1868,8 +1868,17 @@ implementation
|
|||||||
|
|
||||||
if assigned(procdef.parentfpinitblock) then
|
if assigned(procdef.parentfpinitblock) then
|
||||||
begin
|
begin
|
||||||
|
if assigned(tblocknode(procdef.parentfpinitblock).left) then
|
||||||
|
begin
|
||||||
|
{ could be an asmn in case of a pure assembler procedure,
|
||||||
|
but those shouldn't access nested variables }
|
||||||
|
if code.nodetype<>blockn then
|
||||||
|
internalerror(2015122601);
|
||||||
tblocknode(code).left:=cstatementnode.create(procdef.parentfpinitblock,tblocknode(code).left);
|
tblocknode(code).left:=cstatementnode.create(procdef.parentfpinitblock,tblocknode(code).left);
|
||||||
do_typecheckpass(tblocknode(code).left);
|
do_typecheckpass(tblocknode(code).left);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
procdef.parentfpinitblock.free;
|
||||||
procdef.parentfpinitblock:=nil;
|
procdef.parentfpinitblock:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user