[fpc-devel] Looking for some general clarification on how exactly revision #43175 "fixes" bugtracker issue #0036139

Ben Grasset operator97 at gmail.com
Sun Oct 13 22:25:33 CEST 2019

On Sun, Oct 13, 2019 at 3:43 AM Jonas Maebe <jonas at freepascal.org> wrote:

> The snippet came from the compiled program. It showed that the "while
> true do ;" infinite loop got removed by the peephole optimiser (as also
> mentioned by Martin). That was wrong. The peephole optimiser does not
> perform any dead code analyses. It's only supposed to transform code
> patterns into equivalent (but hopefully faster) ones.
> Adding a "v:=2;" statement at the start of the program, which would make
> the loop reachable, did not affect the generated code (i.e., the loop
> was still removed).
> Jonas

Ah, I get it now.  So basically my comment to them on the tracker issue was
just kind of focusing on the wrong thing. Now I know for next time, at
least. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20191013/9fb823c1/attachment.html>

More information about the fpc-devel mailing list