[fpc-devel] Found compiler bug while working on Deep Optimiser

J. Gareth Moreton gareth at moreton-family.com
Sun May 27 16:54:22 CEST 2018


 I stand corrected. Sorry to waste your time on that.

 Gareth aka. Kit

 On Sun 27/05/18 08:31 , Sven Barth via fpc-devel
fpc-devel at lists.freepascal.org sent:
    Am 27.05.2018 um 02:48 schrieb J. Gareth Moreton:
   Hi guys,

 So I'm still experimenting and researching with the deep optimiser, and
I'm starting to have some successes... until I found a compiler bug!

 https://bugs.freepascal.org/view.php?id=33794 [1]

 What I'm trying to do, and something which I'd like to try out with the
regular peephole optimiser at some point, is using a sorted list that maps
an assembler command to a handler procedure and using a binary search to
find the correct routine.  This will speed up the optimiser from O(n)
(i.e. the speed of "case X of") to O(log n) per line of code, where n is
the different number of assembler commands it has to deal with, but the
compiler produces incorrect code with the algorithm I'm using, and triggers
an internal error if -O3 is specified.  A trimmed down sample project is
attached with the ticket.

 Even if the deep optimiser is an unstable, unusable failure, I found a bug
anyway!

 Yes, you found a bug... in your own code. See my note at the bug report.

 Regards,
 Sven
 _______________________________________________
 fpc-devel maillist - fpc-devel at lists.freepascal.org [2]
 http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[3]">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

 

Links:
------
[1] https://bugs.freepascal.org/view.php?id=33794
[2] mailto:fpc-devel at lists.freepascal.org
[3] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180527/a636713b/attachment.html>


More information about the fpc-devel mailing list