mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 08:29:48 +02:00
* fixed a number of missing label reference removals when deleting
instructions that reference them (patch by M.K., mantis #18858) git-svn-id: trunk@17067 -
This commit is contained in:
parent
70e9e5b478
commit
4be36c4b2b
@ -991,6 +991,7 @@ Unit AoptObj;
|
||||
strpnew('next label reused'))));
|
||||
{$endif finaldestdebug}
|
||||
l.increfs;
|
||||
tasmlabel(hp.oper[0]^.ref^.symbol).decrefs;
|
||||
hp.oper[0]^.ref^.symbol := l;
|
||||
if not GetFinalDestination(hp,succ(level)) then
|
||||
exit;
|
||||
@ -1037,6 +1038,12 @@ Unit AoptObj;
|
||||
(hp1.typ <> ait_label) do
|
||||
if not(hp1.typ in ([ait_label,ait_align]+skipinstr)) then
|
||||
begin
|
||||
if (hp1.typ = ait_instruction) and
|
||||
taicpu(hp1).is_jmp and
|
||||
(taicpu(hp1).oper[0]^.typ = top_ref) and
|
||||
assigned(taicpu(hp1).oper[0]^.ref^.symbol) and
|
||||
(taicpu(hp1).oper[0]^.ref^.symbol is TAsmLabel) then
|
||||
TAsmLabel(taicpu(hp1).oper[0]^.ref^.symbol).decrefs;
|
||||
asml.remove(hp1);
|
||||
hp1.free;
|
||||
end
|
||||
@ -1051,6 +1058,7 @@ Unit AoptObj;
|
||||
begin
|
||||
hp2:=tai(hp1.next);
|
||||
asml.remove(p);
|
||||
tasmlabel(taicpu(p).oper[0]^.ref^.symbol).decrefs;
|
||||
p.free;
|
||||
p:=hp2;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user