Browse Source

* reenable ssa on function results if no exit is used, this was broken in r8578

git-svn-id: trunk@14478 -
florian 15 years ago
parent
commit
b2be0445bb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/ncgutil.pas

+ 3 - 1
compiler/ncgutil.pas

@@ -2679,7 +2679,9 @@ implementation
             begin
               if (tabstractvarsym(tloadnode(n).symtableentry).varoptions * [vo_is_dll_var, vo_is_thread_var] = []) and
                  not assigned(tloadnode(n).left) and
-                 (tloadnode(n).symtableentry <> rr^.ressym) and
+                 ((tloadnode(n).symtableentry <> rr^.ressym) or
+                  not(fc_exit in flowcontrol)
+                 ) and
                  (tabstractnormalvarsym(tloadnode(n).symtableentry).localloc.loc in [LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMXREGISTER,LOC_CMMREGISTER]) and
                  (tabstractnormalvarsym(tloadnode(n).symtableentry).localloc.register = rr^.old) then
                 begin