浏览代码

* set nf_write flag properly for vec. nodes of types with implicit dereferencing

git-svn-id: trunk@40339 -
florian 6 年之前
父节点
当前提交
ae8304f657
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      compiler/nld.pas
  2. 1 1
      compiler/nmem.pas

+ 2 - 1
compiler/nld.pas

@@ -517,7 +517,6 @@ implementation
 
       begin
          inherited create(assignn,l,r);
-         l.mark_write;
          assigntype:=at_normal;
          if r.nodetype = typeconvn then
            ttypeconvnode(r).warn_pointer_to_signed:=false;
@@ -587,6 +586,8 @@ implementation
 
         typecheckpass(left);
 
+        left.mark_write;
+
         { PI. This is needed to return correct resultdef of add nodes for ansistrings
           rawbytestring return needs to be replaced by left.resultdef }
         oldassignmentnode:=aktassignmentnode;

+ 1 - 1
compiler/nmem.pas

@@ -1176,7 +1176,7 @@ implementation
       begin
         include(flags,nf_write);
         { see comment in tsubscriptnode.mark_write }
-        if not(is_implicit_pointer_object_type(left.resultdef)) then
+        if not(is_implicit_array_pointer(left.resultdef)) then
           left.mark_write;
       end;