When finding an upgraded array element type, EXT::CL-FIXNUM (a signed
type) is preferred over EXT::CL-INDEX (unsigned). This has the
possibly undesirable result of upgrading an unsigned type to a signed
one. Reversing the ordering as follows allows both signed and
unsigned types to be upgraded as expected.
@@ -266,7 +266,7 @@ has no fill-pointer, and is not adjustable."
(put-sysprop (car l) 'TYPE-PREDICATE (cdr l)))
- '(NIL BASE-CHAR #+unicode CHARACTER BIT EXT::BYTE8 EXT::INTEGER8 EXT::CL-FIXNUM EXT::CL-INDEX SINGLE-FLOAT DOUBLE-FLOAT T))
+ '(NIL BASE-CHAR #+unicode CHARACTER BIT EXT::BYTE8 EXT::INTEGER8 EXT::CL-INDEX EXT::CL-FIXNUM SINGLE-FLOAT DOUBLE-FLOAT T))
(defun upgraded-array-element-type (element-type &optional env)
(let* ((hash (logand 127 (si:hash-eql element-type)))