Browse Source

Be sure not to add a symbol with empty name as an alias for function return variable

Pierre Muller 1 year ago
parent
commit
e7f9626592
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/pparautl.pas

+ 2 - 0
compiler/pparautl.pas

@@ -369,6 +369,8 @@ implementation
                  hs:=pd.resultname^
                  hs:=pd.resultname^
                else
                else
                  hs:=pd.procsym.name;
                  hs:=pd.procsym.name;
+               if (hs='') then
+                 hs:='$_result';
                sl:=tpropaccesslist.create;
                sl:=tpropaccesslist.create;
                sl.addsym(sl_load,pd.funcretsym);
                sl.addsym(sl_load,pd.funcretsym);
                aliasvs:=cabsolutevarsym.create_ref(hs,pd.returndef,sl);
                aliasvs:=cabsolutevarsym.create_ref(hs,pd.returndef,sl);