mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 14:26:16 +02:00
* fixed type of reference used to store an ansichar that was converted
inline to a shortstring git-svn-id: trunk@31049 -
This commit is contained in:
parent
2cdf969649
commit
b9c9422fa7
@ -398,14 +398,20 @@ interface
|
|||||||
|
|
||||||
|
|
||||||
procedure tcgtypeconvnode.second_char_to_string;
|
procedure tcgtypeconvnode.second_char_to_string;
|
||||||
|
var
|
||||||
|
tmpref: treference;
|
||||||
begin
|
begin
|
||||||
location_reset_ref(location,LOC_REFERENCE,OS_NO,2);
|
location_reset_ref(location,LOC_REFERENCE,OS_NO,2);
|
||||||
case tstringdef(resultdef).stringtype of
|
case tstringdef(resultdef).stringtype of
|
||||||
st_shortstring :
|
st_shortstring :
|
||||||
begin
|
begin
|
||||||
tg.gethltemp(current_asmdata.CurrAsmList,cshortstringtype,256,tt_normal,location.reference);
|
tg.gethltemp(current_asmdata.CurrAsmList,cshortstringtype,256,tt_normal,location.reference);
|
||||||
|
tmpref:=location.reference;
|
||||||
|
hlcg.g_ptrtypecast_ref(current_asmdata.CurrAsmList,
|
||||||
|
getpointerdef(cshortstringtype),
|
||||||
|
getpointerdef(left.resultdef),tmpref);
|
||||||
hlcg.a_load_loc_ref(current_asmdata.CurrAsmList,left.resultdef,left.resultdef,left.location,
|
hlcg.a_load_loc_ref(current_asmdata.CurrAsmList,left.resultdef,left.resultdef,left.location,
|
||||||
location.reference);
|
tmpref);
|
||||||
location_freetemp(current_asmdata.CurrAsmList,left.location);
|
location_freetemp(current_asmdata.CurrAsmList,left.location);
|
||||||
end;
|
end;
|
||||||
{ the rest is removed in the resultdef pass and converted to compilerprocs }
|
{ the rest is removed in the resultdef pass and converted to compilerprocs }
|
||||||
|
Loading…
Reference in New Issue
Block a user