TYPEP failure when using displaced arrays.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The following code uses TYPEP to check that a newly created displaced array is of type (ARRAY DOUBLE-FLOAT (* *)).
(let* ((d (make-array (list 2 5 5) :element-type 'double-float))
(v (make-array (list 5 5)
(list (typep v '(array double-float (* *)))
The expected result is (T T) but SBCL currently returns (NIL T).
sbcl --version => "SBCL 1.2.4"
Thanks
Mark
Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-
*FEATURES* =>
(cffi-features:
cffi-features:
:thread-support :quicklisp :asdf-package-
:os-macosx :os-unix :non-base-
:ansi-cl :ash-right-vops :bsd :c-stack-
:compare-
:darwin9-or-better :float-eql-vops :gencgc :ieee-floating-
:inline-constants :inode64 :linkage-table :little-endian
:mach-
:os-provides-
:os-provides-putwc :os-provides-
:raw-instance-
:sb-eval :sb-ldb :sb-package-locks :sb-simd-pack :sb-source-
:sb-thread :sb-unicode :sb-xref-
:stack-
:stack-
:stack-
:unwind-
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
I think the problem lies in SB-C:SOURCE- TRANSFORM- ARRAY-TYPEP in src/compiler/ typetran. lisp.
The predicate ARRAY-TYPE-COMPLEXP returns :MAYBE when applied to both STYPE and TYPE for the test case. I'm not sure whether the /then/ clause of the IF expression should be changed to handle this case or the condition should be altered.