diff --git a/compiler/ncgflw.pas b/compiler/ncgflw.pas index 074a8b02dc..8d7e523585 100644 --- a/compiler/ncgflw.pas +++ b/compiler/ncgflw.pas @@ -1595,7 +1595,7 @@ implementation { Set return value of safecall procedure to indicate exception. } { Exception will be raised after procedure exit based on return value } cg.a_reg_alloc(current_asmdata.CurrAsmList,NR_FUNCTION_RESULT_REG); - cg.a_load_ref_reg(current_asmdata.CurrAsmList,retsym.localloc.size,OS_INT,retsym.localloc.reference,NR_FUNCTION_RESULT_REG); + cg.a_load_loc_reg(current_asmdata.CurrAsmList,OS_INT,retsym.localloc,NR_FUNCTION_RESULT_REG); cg.a_reg_dealloc(current_asmdata.CurrAsmList,NR_FUNCTION_RESULT_REG); end else