Compiler can generate code it cannot load....

Mark Evenson evenson at panix.com
Wed Sep 2 22:34:02 UTC 2015



On 2015/9/2 23:34, Patrick Stein wrote:
> 
> This is a short program for which the compiler creates a file it cannot load.  Save this program to a file, then try: (load (compile-file “this-file.lisp”))
> 
> ;;; This program causes the ABCL compiler to generate code it cannot load.
> ;;;
> ;;; The code compiles and loads correctly if you do any of the following:
> ;;;   * change BUFSIZE to be 'INTEGER instead of '(INTEGER 0 100)
> ;;;   * delete the INLINE declaration for BUFFER-LENGTH
> ;;;   * delete the FTYPE declaration for BUFFER-LENGTH
> ;;;   * delete the TYPE declaration for NEW-CAPACITY
> 
> (deftype bufsize () '(integer 0 100))
> 
> (declaim (inline buffer-length)
>          (ftype (function () bufsize) buffer-length))
> (defun buffer-length ()
>   (the bufsize 10))
> 
> (defun calculate-new-buffer-length (new-capacity)
>   (declare (type bufsize new-capacity))
>   (min (buffer-length) new-capacity))
> 

[…]

Filed as [ticket][397]. Your case definitely seems to be a bug in our
compiler.  Having such nicely specified, small test cases helps us
immensely in tracking down problems in the current compiler.

[397]: http://abcl.org/trac/ticket/397

Thanks for the bug report.

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."



More information about the armedbear-devel mailing list