mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* don't generate tempsfinalize nodes in except filter procdefs, as that would
finalize the parent's temps twice (fix for r40345, mantis #34574) git-svn-id: trunk@40357 -
This commit is contained in:
parent
74f950c88b
commit
b96a8aee61
@ -765,7 +765,8 @@ implementation
|
||||
(cs_implicit_exceptions in current_settings.moduleswitches)) then
|
||||
begin
|
||||
include(tocode.flags,nf_block_with_exit);
|
||||
addstatement(newstatement,cfinalizetempsnode.create);
|
||||
if procdef.proctypeoption<>potype_exceptfilter then
|
||||
addstatement(newstatement,cfinalizetempsnode.create);
|
||||
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,newstatement);
|
||||
temps_finalized:=true;
|
||||
end;
|
||||
@ -910,7 +911,8 @@ implementation
|
||||
current_filepos:=exitpos;
|
||||
{ Generate code that will be in the try...finally }
|
||||
finalcode:=internalstatements(codestatement);
|
||||
addstatement(codestatement,cfinalizetempsnode.create);
|
||||
if procdef.proctypeoption<>potype_exceptfilter then
|
||||
addstatement(codestatement,cfinalizetempsnode.create);
|
||||
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,codestatement);
|
||||
temps_finalized:=true;
|
||||
|
||||
@ -943,7 +945,8 @@ implementation
|
||||
addstatement(newstatement,bodyexitcode);
|
||||
if not is_constructor then
|
||||
begin
|
||||
addstatement(newstatement,cfinalizetempsnode.create);
|
||||
if procdef.proctypeoption<>potype_exceptfilter then
|
||||
addstatement(newstatement,cfinalizetempsnode.create);
|
||||
cnodeutils.procdef_block_add_implicit_finalize_nodes(procdef,newstatement);
|
||||
temps_finalized:=true;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user