Browse Source

* fixed internal error with functions with ret_in_param result types and unitialized result

git-svn-id: branches/wasm@48234 -
nickysn 4 years ago
parent
commit
f8361cb5dd
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/wasm32/hlcgcpu.pas

+ 3 - 0
compiler/wasm32/hlcgcpu.pas

@@ -1004,6 +1004,9 @@ implementation
 
   procedure thlcgwasm.gen_load_uninitialized_function_result(list: TAsmList; pd: tprocdef; resdef: tdef; const resloc: tcgpara);
     begin
+      { nothing to do for ret_in_param results }
+      if paramanager.ret_in_param(pd.returndef,pd) then
+        exit;
       { constructors don't return anything in Java }
       if pd.proctypeoption=potype_constructor then
         exit;