Prechádzať zdrojové kódy

* explicitly reset successor if noreturn is set

git-svn-id: trunk@49487 -
(cherry picked from commit a988c0fab165f3146d13b8aae172680a079437ad)
florian 4 rokov pred
rodič
commit
078a6c31c9
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      compiler/optutils.pas

+ 3 - 1
compiler/optutils.pas

@@ -295,7 +295,9 @@ unit optutils;
               begin
               begin
                 { not sure if this is enough (FK) }
                 { not sure if this is enough (FK) }
                 result:=p;
                 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;
                   p.successor:=succ;
               end;
               end;
             inlinen:
             inlinen: