瀏覽代碼

* fix tc_bool_2_int simplification in case pass typecheck runs again, e.g.
after getting a copy of the node during CSE (fixes taddset4 compilation
with LLVM after r44712)

git-svn-id: trunk@45087 -

Jonas Maebe 5 年之前
父節點
當前提交
f5e89ded35
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/ncnv.pas

+ 1 - 0
compiler/ncnv.pas

@@ -3220,6 +3220,7 @@ implementation
                     end;
                     end;
                   if (convtype=tc_int_2_int) and (left.nodetype=typeconvn) and (ttypeconvnode(left).convtype=tc_bool_2_int) then
                   if (convtype=tc_int_2_int) and (left.nodetype=typeconvn) and (ttypeconvnode(left).convtype=tc_bool_2_int) then
                     begin
                     begin
+                      ttypeconvnode(left).totypedef:=resultdef;
                       ttypeconvnode(left).resultdef:=resultdef;
                       ttypeconvnode(left).resultdef:=resultdef;
                       result:=left;
                       result:=left;
                       left:=nil;
                       left:=nil;