mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 00:27:22 +01:00
+ 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:
parent
62c417c8bf
commit
8738b4b47f
@ -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;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user