* explicitly convert array indicies to pointer sized integers, so cse

can handle the conversion

git-svn-id: trunk@47150 -
This commit is contained in:
florian 2020-10-21 20:46:28 +00:00
parent 4afa4a73c6
commit 044133fc87

View File

@ -1052,10 +1052,15 @@ implementation
int64(Tarraydef(left.resultdef).lowrange),
int64(Tarraydef(left.resultdef).highrange),
true
))
));
end
else
inserttypeconv(right,htype)
begin
inserttypeconv(right,htype);
{ insert type conversion so cse can pick it up }
if (htype.size<ptrsinttype.size) and is_integer(htype) and not(cs_check_range in current_settings.localswitches) then
inserttypeconv_internal(right,ptrsinttype);
end;
end;
stringdef:
if is_open_string(left.resultdef) then