Explorar o código

* allow function results of inlined functions to be regvars

git-svn-id: trunk@15494 -
Jonas Maebe %!s(int64=15) %!d(string=hai) anos
pai
achega
f72526b95f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      compiler/ncal.pas

+ 3 - 1
compiler/ncal.pas

@@ -2204,7 +2204,9 @@ implementation
               end
             else
               begin
-                temp:=ctempcreatenode.create(resultdef,resultdef.size,tt_persistent,false);
+                temp:=ctempcreatenode.create(resultdef,resultdef.size,tt_persistent,
+                  (cnf_do_inline in callnodeflags) and
+                  not(tabstractvarsym(tprocdef(procdefinition).funcretsym).varregable in [vr_none,vr_addr]));
                 include(temp.flags,nf_is_funcret);
                 add_init_statement(temp);
                 { When the function result is not used in an inlined function