Explorar o código

* explicitly reset successor if noreturn is set

git-svn-id: trunk@49487 -
(cherry picked from commit a988c0fab165f3146d13b8aae172680a079437ad)
florian %!s(int64=4) %!d(string=hai) anos
pai
achega
078a6c31c9
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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: