From 7e2d4fb29e6b4f4a0c4eb565ec89f1590fdd3327 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 6 Oct 2014 20:54:36 +0000 Subject: [PATCH] * fixed type used to load the code pointer of a complex procvar git-svn-id: branches/hlcgllvm@28782 - --- compiler/ncgcal.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/ncgcal.pas b/compiler/ncgcal.pas index 73e77f39ac..278bc34e9a 100644 --- a/compiler/ncgcal.pas +++ b/compiler/ncgcal.pas @@ -790,7 +790,11 @@ implementation hlcg.a_load_reg_reg(current_asmdata.CurrAsmList,codeprocdef,codeprocdef,srcreg,result) end else - hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,codeprocdef,codeprocdef,right.location,result); + begin + hlcg.location_force_mem(current_asmdata.CurrAsmList,right.location,procdefinition); + hlcg.g_ptrtypecast_ref(current_asmdata.CurrAsmList,getpointerdef(procdefinition),getpointerdef(codeprocdef),right.location.reference); + hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,codeprocdef,codeprocdef,right.location.reference,result); + end; end;