Selaa lähdekoodia

* fixed memory typecast of complex procdef to simple procvar: left.resultdef
is a procdef, but after the load was finished it's actually already a
(complex) procvar. And since it's a memory location, the result of the
typecast is a pointer to the typeconvnode's resultdef (fixes
tests/tbs/tb0594.pp and others for llvm)

git-svn-id: trunk@34151 -

Jonas Maebe 9 vuotta sitten
vanhempi
commit
017d4edbbb
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      compiler/ncgcnv.pas

+ 1 - 1
compiler/ncgcnv.pas

@@ -556,7 +556,7 @@ interface
                     begin
                       location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,resultdef);
                       { code field is the first one }
-                      hlcg.g_ptrtypecast_ref(current_asmdata.CurrAsmList,left.resultdef,resultdef,left.location.reference);
+                      hlcg.g_ptrtypecast_ref(current_asmdata.CurrAsmList,cpointerdef.getreusable(tprocvardef(tprocdef(left.resultdef).getcopyas(procvardef,pc_normal))),cpointerdef.getreusable(resultdef),left.location.reference);
                       hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,resultdef,resultdef,left.location.reference,location.register);
                     end;
                   LOC_REGISTER,LOC_CREGISTER: