mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 07:08:12 +02:00
* finalizetemps nodes should never be considered equal and have side effects
git-svn-id: trunk@40348 -
This commit is contained in:
parent
0052e4da81
commit
ea69a5b372
@ -63,6 +63,7 @@ interface
|
||||
constructor create;virtual;
|
||||
function pass_1 : tnode;override;
|
||||
function pass_typecheck:tnode;override;
|
||||
function docompare(p: tnode): boolean; override;
|
||||
end;
|
||||
tfinalizetempsnodeclass = class of tfinalizetempsnode;
|
||||
|
||||
@ -484,6 +485,12 @@ implementation
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
function tfinalizetempsnode.docompare(p: tnode): boolean;
|
||||
begin
|
||||
{ these nodes should never be coalesced }
|
||||
result:=false;
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
TSTATEMENTNODE
|
||||
|
@ -1342,7 +1342,7 @@ implementation
|
||||
function check_for_sideeffect(var n: tnode; arg: pointer): foreachnoderesult;
|
||||
begin
|
||||
result:=fen_false;
|
||||
if (n.nodetype in [assignn,calln,asmn]) or
|
||||
if (n.nodetype in [assignn,calln,asmn,finalizetempsn]) or
|
||||
((n.nodetype=inlinen) and
|
||||
(tinlinenode(n).inlinenumber in [in_write_x,in_writeln_x,in_read_x,in_readln_x,in_str_x_string,
|
||||
in_val_x,in_reset_x,in_rewrite_x,in_reset_typedfile,in_rewrite_typedfile,
|
||||
|
Loading…
Reference in New Issue
Block a user