浏览代码

* just copy value parameters to a temp. when inlining instead of
using (@...)^ constructs, resolves #39590

florian 3 年之前
父节点
当前提交
d198fc46cb
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      compiler/ncal.pas

+ 8 - 0
compiler/ncal.pas

@@ -4904,6 +4904,14 @@ implementation
             not valid_for_addr(para.left,false)) then
           exit(true);
 
+        { insert value parameters directly if they are complex instead
+          of inserting a reference to the temp.
+          - this keeps the node tree simpler
+          - alignment is propagated }
+        if (para.parasym.varspez=vs_value) and
+          complexpara then
+          exit(true);
+
         result:=false;
       end;