SPEED 3 seems to cause trouble with array declaration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
With the function F in a file, let's say foo.lisp, I get the following error:
```
* (load "/tmp/foo.lisp")
While evaluating the form starting at line 1, column 0
of #P"/tmp/foo.lisp":
debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {9D37329}>:
The value
NIL
is not of type
(UNSIGNED-BYTE 5)
from the function type declaration.
```
Here is the definition of F. If I change SPEED 3 to SPEED 2, the error goes away. (There are several warnings about undefined functions but that's expected.)
```
(defun f ()
(let ((a (foo)))
(declare (type (simple-array (complex double-float) (*)) a))
(let* ((n (baz)) (b (bar))
(z (make-array n :element-type '(complex double-float))))
(declare (type (simple-array (complex double-float) (*)) b))
(locally (declare (optimize (speed 3)))
```
I am working with SBCL 1.4.8 on Linux (x86). SBCL 1.4.6 shows the same behavior, 1.3.13 loads foo.lisp without complaint.
`uname -a` reports:
```
Linux freekbox 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:23:46 UTC 2014 i686 i686 i686 GNU/Linux
```
`*features*` reports:
```
(:ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
:NON-BASE-
:ASH-RIGHT-VOPS :C-STACK-
:CYCLE-COUNTER :ELF :FP-AND-
:IEEE-
:LITTLE-ENDIAN :MEMORY-
:OS-PROVIDES-
:OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-
:PACKAGE-
:RELOCATABLE-HEAP :SB-DOC :SB-EVAL :SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS
:SB-SOURCE-
:STACK-
:STACK-
:UNIX :UNWIND-
```
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Can't reproduce.