mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 02:59:13 +02:00
* properly deal with reference temps in tcgtempdeletenode.pass_generate_code
git-svn-id: branches/jvmbackend@18665 -
This commit is contained in:
parent
102e9cf8f4
commit
b556c05b1a
@ -501,6 +501,21 @@ interface
|
|||||||
|
|
||||||
procedure tcgtempdeletenode.pass_generate_code;
|
procedure tcgtempdeletenode.pass_generate_code;
|
||||||
begin
|
begin
|
||||||
|
if ti_reference in tempinfo^.flags then
|
||||||
|
begin
|
||||||
|
{ release_to_normal means that the temp will be freed the next
|
||||||
|
time it's used. However, reference temps reference some other
|
||||||
|
location that is not managed by this temp and hence cannot be
|
||||||
|
freed }
|
||||||
|
if release_to_normal then
|
||||||
|
internalerror(2011052205);
|
||||||
|
{ so we only mark this temp location as "no longer valid" when
|
||||||
|
it's deleted (ttempdeletenodes are also used during getcopy, so
|
||||||
|
we really do need one) }
|
||||||
|
exclude(tempinfo^.flags,ti_valid);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
location_reset(location,LOC_VOID,OS_NO);
|
location_reset(location,LOC_VOID,OS_NO);
|
||||||
|
|
||||||
case tempinfo^.location.loc of
|
case tempinfo^.location.loc of
|
||||||
|
Loading…
Reference in New Issue
Block a user