+ might_have_sideeffects checks also if the tempinitcode of a tempref node might have side effects

git-svn-id: trunk@45656 -
This commit is contained in:
florian 2020-06-17 20:33:04 +00:00
parent 62c417c8bf
commit 8738b4b47f

View File

@ -1437,8 +1437,13 @@ implementation
(vo_volatile in tabstractvarsym(tloadnode(n).symtableentry).varoptions)
)
)
) then
result:=fen_norecurse_true;
) or
{ foreachonode does not recurse into the init code for temprefnode as this is done for
by the tempcreatenode but the considered tree might not contain the tempcreatenode so play
save and recurce into the init code if there is any }
((n.nodetype=temprefn) and (ti_executeinitialisation in ttemprefnode(n).tempflags) and
might_have_sideeffects(ttemprefnode(n).tempinfo^.tempinitcode,pmhs_flags(arg)^)) then
result:=fen_norecurse_true
end;