* properly deal with reference temps in tcgtempdeletenode.pass_generate_code

git-svn-id: branches/jvmbackend@18665 -
This commit is contained in:
Jonas Maebe 2011-08-20 08:22:38 +00:00
parent 102e9cf8f4
commit b556c05b1a

View File

@ -501,6 +501,21 @@ interface
procedure tcgtempdeletenode.pass_generate_code;
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);
case tempinfo^.location.loc of