From ea0c8e6f38eb142e5bfb7fa0192f4c800acec737 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 22 Nov 2015 11:52:30 +0000 Subject: [PATCH] - reverted accidentally committed code with r32463 git-svn-id: trunk@32476 - --- compiler/ncgcal.pas | 13 +------------ compiler/ncnv.pas | 3 ++- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/compiler/ncgcal.pas b/compiler/ncgcal.pas index 408d06aeeb..b68a2532fd 100644 --- a/compiler/ncgcal.pas +++ b/compiler/ncgcal.pas @@ -154,21 +154,10 @@ implementation procedure tcgcallparanode.push_addr_para; - var - valuedef: tdef; begin if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then internalerror(200304235); - { see the call to keep_para_array_range in ncal: if that call returned - true, we overwrite the resultdef of left with its original resultdef - (to keep track of the range of the original arrat); we inserted a type - conversion to parasym.vardef, so that is the type this value actually - has } - if paramanager.keep_para_array_range(parasym.varspez,parasym.vardef,aktcallnode.procdefinition.proccalloption) then - valuedef:=parasym.vardef - else - valuedef:=left.resultdef; - hlcg.a_loadaddr_ref_cgpara(current_asmdata.CurrAsmList,valuedef,left.location.reference,tempcgpara); + hlcg.a_loadaddr_ref_cgpara(current_asmdata.CurrAsmList,left.resultdef,left.location.reference,tempcgpara); end; diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index b28dd9039f..1a66010213 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -1606,12 +1606,13 @@ implementation begin { a dynamic array is a pointer to an array, so to convert it to } { an open array, we have to dereference it (JM) } - result := ctypeconvnode.create_internal(left,cpointerdef.getreusable(resultdef)); + result := ctypeconvnode.create_internal(left,voidpointertype); typecheckpass(result); { left is reused } left := nil; result := cderefnode.create(result); include(result.flags,nf_no_checkpointer); + result.resultdef := resultdef; end;