summaryrefslogtreecommitdiff
path: root/compiler/ncgld.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-04-27 19:18:59 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-04-27 19:18:59 +0000
commit54858ba7bed8854722a6914c61439ecd7c5c85d9 (patch)
treed2f6c700ceffbfae5a61f851382a451123992a4f /compiler/ncgld.pas
parent66a4ad5f5c4a2c103b3da134066e306bcbfcc8e3 (diff)
downloadfpc-54858ba7bed8854722a6914c61439ecd7c5c85d9.tar.gz
* ensure that load nodes only substitute temps in case both references point
to the start of their respective temps git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@38859 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncgld.pas')
-rw-r--r--compiler/ncgld.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ncgld.pas b/compiler/ncgld.pas
index f0634003e8..514294c1b0 100644
--- a/compiler/ncgld.pas
+++ b/compiler/ncgld.pas
@@ -180,11 +180,11 @@ implementation
{ still used later on in initialisation/finalisation code }
is_managed_type(n.resultdef) or
{ source and destination are temps (= not global variables) }
- not tg.istemp(n.location.reference) or
- not tg.istemp(newref) or
{ and both point to the start of a temp, and the source is a }
{ non-persistent temp (otherwise we need some kind of copy- }
{ on-write support in case later on both are still used) }
+ not tg.isstartoftemp(newref) or
+ not tg.isstartoftemp(n.location.reference) or
(tg.gettypeoftemp(newref) <> tt_normal) or
not (tg.gettypeoftemp(n.location.reference) in [tt_normal,tt_persistent]) or
{ and both have the same size }