Переглянути джерело

* Fixed bug #17413 (and the tw17413 test) for aarch64 by adding additional check.

git-svn-id: trunk@39951 -
yury 6 роки тому
батько
коміт
7c94d00a4a
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      compiler/ncgld.pas

+ 3 - 1
compiler/ncgld.pas

@@ -112,7 +112,9 @@ implementation
                  { ... at the place we are looking for }
                  references_equal(tabstractnormalvarsym(tloadnode(n).symtableentry).localloc.reference,rr^.old^) and
                  { its address cannot have escaped the current routine }
-                 not(tabstractvarsym(tloadnode(n).symtableentry).addr_taken) then
+                 not(tabstractvarsym(tloadnode(n).symtableentry).addr_taken) and
+                 { it is not accessed in nested procedures }
+                 not(tabstractvarsym(tloadnode(n).symtableentry).different_scope) then
                 begin
                   { relocate variable }
                   tcgloadnode(n).changereflocation(rr^.new^);