Преглед на файлове

* explicitly reset successor if noreturn is set

git-svn-id: trunk@49487 -
florian преди 4 години
родител
ревизия
a988c0fab1
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      compiler/optutils.pas

+ 3 - 1
compiler/optutils.pas

@@ -307,7 +307,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: