<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Unless I'm missing something, that could be unrolled without any problems. The only problem that could occur is if Test2 raises an exception (which, as the name implies, is an exceptional situation) or it jumps outside of the procedure, which can only realistically occur in some compiler optimisations (e.g. CALL [routine]; RET is optimised to JMP [routine]). Exit is not a problem here because it will simply exit Test2 and stay within the for-loop.<br>
<div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Mon 21/05/18 18:27 , Ondrej Pokorny lazarus@kluug.net sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">On 21.05.2018 18:23, Martok wrote:
<br>
<span style="color: rgb(102, 102, 102);">> Am 21.05.2018 um 17:44 schrieb Florian Klämpfl:
</span><br>
<span style="color: rgb(102, 102, 102);">>> I added raise, exit, goto and label as well.
</span><br>
<span style="color: rgb(102, 102, 102);">> Oh, label, right.
</span><br>
<span style="color: rgb(102, 102, 102);">>
</span><br>
<span style="color: rgb(102, 102, 102);">> I'd say #0033614 can be resolved as "fixed in 39083" and #0033753 as "no change
</span><br>
<span style="color: rgb(102, 102, 102);">> required" then.
</span><br>
<br>
Well there is still something left:
<br>
<br>
program LoopUnrollTest;
<br>
procedure Test;
<br>
var
<br>
I: Integer;
<br>
procedure Test2;
<br>
begin
<br>
Writeln(I);
<br>
end;
<br>
begin
<br>
for I := 1 to 10 do
<br>
Test2;
<br>
end;
<br>
begin
<br>
Test;
<br>
end.
<br>
<br>
Ondrej
<br>
_______________________________________________
<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a target="_blank" href="<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a>
<br>
<br>
<br>
</blockquote></HTML>