Pārlūkot izejas kodu

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

git-svn-id: trunk@40339 -
florian 6 gadi atpakaļ
vecāks
revīzija
ae8304f657
2 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 2 1
      compiler/nld.pas
  2. 1 1
      compiler/nmem.pas

+ 2 - 1
compiler/nld.pas

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

+ 1 - 1
compiler/nmem.pas

@@ -1176,7 +1176,7 @@ implementation
       begin
       begin
         include(flags,nf_write);
         include(flags,nf_write);
         { see comment in tsubscriptnode.mark_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;
           left.mark_write;
       end;
       end;