* decide more sophisticately if a temp. var is needed for fixing #40618

This commit is contained in:
florian 2024-02-02 22:00:22 +01:00
parent 27a2a04279
commit d44cae14f5

View File

@ -958,7 +958,7 @@ implementation
caddnode.create_internal(equaln,left.getcopy,cordconstnode.create(flabels^._low,left.resultdef,false)),
pcaseblock(blocks[flabels^.blockid])^.statement,elseblock);
end
else if left.nodetype in [loadn,temprefn] then
else if not(might_have_sideeffects(left,[mhs_exceptions])) and (node_complexity(left)<=1) then
begin
result:=cifnode.create_internal(
caddnode.create_internal(andn,