From ae8304f65776c3bbccbe89f6eb2981462ca96e52 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 17 Nov 2018 15:08:23 +0000 Subject: [PATCH] * set nf_write flag properly for vec. nodes of types with implicit dereferencing git-svn-id: trunk@40339 - --- compiler/nld.pas | 3 ++- compiler/nmem.pas | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/nld.pas b/compiler/nld.pas index 006f831aa0..798820174d 100644 --- a/compiler/nld.pas +++ b/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; diff --git a/compiler/nmem.pas b/compiler/nmem.pas index d5c1d85e8f..52add1fd81 100644 --- a/compiler/nmem.pas +++ b/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;