Sfoglia il codice sorgente

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

florian 1 anno fa
parent
commit
d44cae14f5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      compiler/nset.pas

+ 1 - 1
compiler/nset.pas

@@ -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,