Compiler can generate code it cannot load....

Patrick Stein pat at nklein.com
Wed Sep 2 23:30:58 UTC 2015


I distilled the test case down when I was trying to track down why my USERIAL library was failing with ABCL in CL-TEST-GRID:

    https://common-lisp.net/project/cl-test-grid/library/userial.html <https://common-lisp.net/project/cl-test-grid/library/userial.html>
    http://cl-test-grid.appspot.com/blob?key=k3y3y5ama1 <http://cl-test-grid.appspot.com/blob?key=k3y3y5ama1>

I don’t think that’s going to lend any more insight than the case below.  But, anyhow….

Thanks,
Patrick



> On Sep 2, 2015, at 5:34 PM, Mark Evenson <evenson at panix.com> wrote:
> 
> 
> 
> 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 <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."

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20150902/0b8f52f3/attachment.html>


More information about the armedbear-devel mailing list