Browse Source

* allow function results of inlined functions to be regvars

git-svn-id: trunk@15494 -
Jonas Maebe 15 years ago
parent
commit
f72526b95f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/ncal.pas

+ 3 - 1
compiler/ncal.pas

@@ -2204,7 +2204,9 @@ implementation
               end
               end
             else
             else
               begin
               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);
                 include(temp.flags,nf_is_funcret);
                 add_init_statement(temp);
                 add_init_statement(temp);
                 { When the function result is not used in an inlined function
                 { When the function result is not used in an inlined function