(regression since 1.0.37.44).
* bug fix: accessing &MORE (stack allocated &REST) arguments checks bounds.
(lp#1154946)
+ * bug fix: compiling make-array no longer signals an error when the
+ element-type is an uknown type, a warning is issued instead.
+ Thanks to James Kalenius (lp#1156095)
changes in sbcl-1.1.5 relative to sbcl-1.1.4:
* minor incompatible change: SB-SPROF:WITH-PROFILING no longer loops
(unless (constant-lvar-p dims)
(give-up-ir1-transform
"The dimension list is not constant; cannot open code array creation."))
- (let ((dims (lvar-value dims)))
+ (let ((dims (lvar-value dims))
+ (element-type-ctype (and (constant-lvar-p element-type)
+ (ir1-transform-specifier-type
+ (lvar-value element-type)))))
+ (when (unknown-type-p element-type-ctype)
+ (give-up-ir1-transform))
(unless (every #'integerp dims)
(give-up-ir1-transform
"The dimension list contains something other than an integer: ~S"
(rank (length dims))
(spec `(simple-array
,(cond ((null element-type) t)
- ((and (constant-lvar-p element-type)
- (ir1-transform-specifier-type
- (lvar-value element-type)))
+ (element-type-ctype
(sb!xc:upgraded-array-element-type
(lvar-value element-type)))
(t '*))
(let ((a (make-array 1 :initial-element 5)))
(assert (equalp (adjust-array a 2 :initial-element 10)
#(5 10)))))
+
+(with-test (:name (make-array-transform-unknown-type :bug-1156095))
+ (assert
+ (handler-case
+ (compile nil `(lambda () (make-array '(1 2)
+ :element-type ',(gensym))))
+ (style-warning ()
+ t)
+ (:no-error (&rest args)
+ nil))))