projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.16.16: Use declared element type in AREF short-circuit transform
[sbcl.git]
/
tests
/
compiler.pure.lisp
diff --git
a/tests/compiler.pure.lisp
b/tests/compiler.pure.lisp
index
88463e1
..
b5df3b9
100644
(file)
--- a/
tests/compiler.pure.lisp
+++ b/
tests/compiler.pure.lisp
@@
-528,11
+528,19
@@
(funcall f y 1)
(assert (equal y #*10))))
(funcall f y 1)
(assert (equal y #*10))))
+;;; use of declared array types
(handler-bind ((sb-ext:compiler-note #'error))
(compile nil '(lambda (x)
(handler-bind ((sb-ext:compiler-note #'error))
(compile nil '(lambda (x)
- (declare (type (simple-array (simple-string 3) (5)) x))
+ (declare (type (simple-array (simple-string 3) (5)) x)
+ (optimize speed))
(aref (aref x 0) 0))))
(aref (aref x 0) 0))))
+(handler-bind ((sb-ext:compiler-note #'error))
+ (compile nil '(lambda (x)
+ (declare (type (simple-array (simple-array bit (10)) (10)) x)
+ (optimize speed))
+ (1+ (aref (aref x 0) 0)))))
+
;;; compiler failure
(let ((f (compile nil '(lambda (x) (typep x '(not (member 0d0)))))))
(assert (funcall f 1d0)))
;;; compiler failure
(let ((f (compile nil '(lambda (x) (typep x '(not (member 0d0)))))))
(assert (funcall f 1d0)))