瀏覽代碼

* explicitly reset successor if noreturn is set

git-svn-id: trunk@49487 -
(cherry picked from commit a988c0fab165f3146d13b8aae172680a079437ad)
florian 4 年之前
父節點
當前提交
078a6c31c9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/optutils.pas

+ 3 - 1
compiler/optutils.pas

@@ -295,7 +295,9 @@ unit optutils;
               begin
                 { not sure if this is enough (FK) }
                 result:=p;
-                if not(cnf_call_never_returns in tcallnode(p).callnodeflags) then
+                if cnf_call_never_returns in tcallnode(p).callnodeflags then
+                  p.successor:=nil
+                else
                   p.successor:=succ;
               end;
             inlinen: