Browse Source

- removed the code to check whether a parameter to an inline routine is
also the by-reference function result of a call node, now that this is
properly checked in the general case (these parameters/function results
are temp nodes in case of inlined calls)

git-svn-id: trunk@34446 -

Jonas Maebe 9 years ago
parent
commit
388c047c8a
1 changed files with 2 additions and 10 deletions
  1. 2 10
      compiler/ncal.pas

+ 2 - 10
compiler/ncal.pas

@@ -4589,17 +4589,9 @@ implementation
             exit(true);
 
           { Value parameters of which we know they are modified by definition
-            have to be copied to a temp; the same goes for cases of "x:=f(x)"
-            where x is passed as value parameter to f(), at least if we
-            optimized invocation by setting the funcretnode to x to avoid an
-            assignment afterwards (since x may be read inside the function after
-            it modified result==x) }
+            have to be copied to a temp }
           if (para.parasym.varspez=vs_value) and
-             (not(para.parasym.varstate in [vs_initialised,vs_declared,vs_read]) or
-              (assigned(aktassignmentnode) and
-               (aktassignmentnode.right=self) and
-               (nf_assign_done_in_right in aktassignmentnode.flags) and
-               actualtargetnode(@aktassignmentnode.left)^.isequal(actualtargetnode(@para.left)^))) then
+             not(para.parasym.varstate in [vs_initialised,vs_declared,vs_read]) then
             exit(true);
 
           { the compiler expects that it can take the address of parameters passed by reference in