浏览代码

* Disallow placing hidden 'high' parameter in register if it will be accessed from implicit finally block (happens for <value open array of managed type> parameters).

git-svn-id: trunk@20072 -
sergei 13 年之前
父节点
当前提交
898fbdcd26
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      compiler/pdecsub.pas

+ 5 - 0
compiler/pdecsub.pas

@@ -409,6 +409,11 @@ implementation
                hvs:=tparavarsym.create('$high'+name,paranr+1,vs_const,sinttype,[vo_is_high_para,vo_is_hidden_para]);
                hvs.symoptions:=[];
                owner.insert(hvs);
+               { don't place to register if it will be accessed from implicit finally block }
+               if (varspez=vs_value) and
+                 is_open_array(vardef) and
+                 is_managed_type(vardef) then
+                 hvs.varregable:=vr_none;
              end
            else
             begin