>>>>> "Alexey" == Alexey Dejneka <adejneka@...> writes:
Alexey> Brian Spilsbury <brian@...> writes:
>> I have an odd compiler error, it looks like it is inferring
>> that eltype cannot be a cons, but that's definitely weird since
>> the known-def give it as returning a type-specifier which can
>> be a list.
>> The function works fine while interpreted, but compiling it
>> causes it to break.
>> Perhaps someone can see something I've overlooked (this is in
>> (defun pixarray-element-size (pixarray) (let ((eltype
>> (array-element-type pixarray))) (cond ((eq eltype 'bit) 1)
>> ((and (listp eltype) (eq (first eltype) 'unsigned-byte))
>> (second eltype)) (t (error "Invalid pixarray: ~S."
Alexey> Optimizer thinks PIXARRAY is of type (ARRAY *), therefore
Alexey> ELTYPE is *, i.e. of type (MEMBER *), or, more generally,
Alexey> of type SYMBOL. Here is the patch.
I note that SBCL has incorporated my array-element-type and coerce
optimizers. Unless you've made some changes to it, I think the coerce
optimizer is buggy and will cause bad code to be generated.
(I'd do a diff, but I don't have the code anymore).
I also don't have my test case that demonstrates this bug,
unfortunately. But it was sufficiently buggy for me to delete it from
my working sources.