CONCATENATE computes incorrect result on string with declaration, fill pointer

Bug #1790703 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Please note how fill pointers and string types interact.

(typep (make-array '(1) :element-type 'character :fill-pointer 0) '(string 1)) ==> true

So:

(defun f301 (p2 p3)
  (declare (optimize (speed 2))
           (type (string 1) p3))
  (concatenate 'string p2 p3))

(f301 nil (make-array '(1) :element-type 'character :fill-pointer 0)) ==> "^@"

However:

(concatenate 'string nil (make-array '(1) :element-type 'character :fill-pointer 0)) ==> ""

Revision history for this message
Stas Boukarev (stassats) wrote :

c08c891c933058bc704383d24a854dcac421511a

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.