* fixed copying order of callnode siblings (callcleanupblock must be

copied before funcretnode because it may contain tempdeletenodes
    that turn a temp to "delete on next use", with the use in the
    funcretnode)

git-svn-id: branches/jvmbackend@20141 -
This commit is contained in:
Jonas Maebe 2012-01-21 19:35:52 +00:00
parent c9f19d710b
commit 7f15423d76

View File

@ -1334,14 +1334,18 @@ implementation
n.methodpointer:=methodpointer.dogetcopy
else
n.methodpointer:=nil;
if assigned(funcretnode) then
n.funcretnode:=funcretnode.dogetcopy
else
n.funcretnode:=nil;
{ must be copied before the funcretnode, because the callcleanup block
may contain a ttempdeletenode that sets the tempinfo of the
corresponding temp to ti_nextref_set_hookoncopy_nil, and this nextref
itself may be the funcretnode }
if assigned(callcleanupblock) then
n.callcleanupblock:=tblocknode(callcleanupblock.dogetcopy)
else
n.callcleanupblock:=nil;
if assigned(funcretnode) then
n.funcretnode:=funcretnode.dogetcopy
else
n.funcretnode:=nil;
if assigned(varargsparas) then
begin
n.varargsparas:=tvarargsparalist.create(true);