* fix internalerror 200502052 with certain min/max optimizations on x86-64, resolves #40730

This commit is contained in:
florian 2024-04-06 23:31:37 +02:00
parent 01f9053f3d
commit 139f2dfe84

View File

@ -1751,6 +1751,15 @@ implementation
{ Try to use references as is, unless they would trigger internal
error 200502052 }
if (cs_create_pic in current_settings.moduleswitches) and
(paraarray[1].location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) and
Assigned(paraarray[1].location.reference.symbol) then
hlcg.location_force_reg(current_asmdata.CurrAsmList,paraarray[1].location,
paraarray[1].resultdef,paraarray[1].resultdef,true);
{ Try to use references as is, unless they would trigger internal
error 200502052 }
if (cs_create_pic in current_settings.moduleswitches) and
(paraarray[2].location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) and
Assigned(paraarray[2].location.reference.symbol) then
hlcg.location_force_reg(current_asmdata.CurrAsmList,paraarray[2].location,
paraarray[2].resultdef,paraarray[2].resultdef,true);