diff --git a/compiler/ncal.pas b/compiler/ncal.pas index aa14f9a60e..1cbebfd6b0 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -5203,18 +5203,7 @@ implementation inlineinitstatement:=nil; inlinecleanupstatement:=nil; - { we cannot replace the whole block by a single assignment if the call - has an init/cleanup block - - we could though (not yet done), convert this into a bew block - consisting of the init code, the single assignment and the cleanup block - This might even enable new transformations } - if not(assigned(callinitblock)) and not(assigned(callcleanupblock)) then - { if all that's left of the inlined function is an constant assignment - to the result, replace the whole block with the constant only } - n:=optimize_funcret_assignment(inlineblock) - else - n:=nil; + n:=optimize_funcret_assignment(inlineblock); if assigned(n) then begin inlineblock.free;