Update of /cvsroot/sbcl/sbcl/tests
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv3465/tests
Modified Files:
dynamic-extent.impure.lisp
Log Message:
1.0.36.23: more consistent handling of ignored DX declarations
* Use COMPILER-STYLE-WARN if the declaration is for an unbound
variable or function.
* Use COMPILER-NOTIFY is the declaration is free, but the
var/function is bound.
* Take care not to create an entry in *FREE-VARS* due to processing
a DX declaration.
Fixed launchpad bug #497321.
Index: dynamic-extent.impure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/dynamic-extent.impure.lisp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- dynamic-extent.impure.lisp 4 Aug 2009 10:59:09 -0000 1.45
+++ dynamic-extent.impure.lisp 12 Mar 2010 12:37:13 -0000 1.46
@@ -813,4 +813,25 @@
(flet ((foo (x) (declare (ignore x))))
(let ((bad-boy (bad-boy (vec 2.0 3.0 4.0))))
(assert-no-consing (funcall bad-boy #'foo)))))
+
+(with-test (:name :bug-497321)
+ (flet ((test (lambda type)
+ (let ((n 0))
+ (handler-bind ((condition (lambda (c)
+ (incf n)
+ (unless (typep c type)
+ (error "wanted ~S for~% ~S~%got ~S"
+ type lambda (type-of c))))))
+ (compile nil lambda))
+ (assert (= n 1)))))
+ (test `(lambda () (declare (dynamic-extent #'bar)))
+ 'style-warning)
+ (test `(lambda () (declare (dynamic-extent bar)))
+ 'style-warning)
+ (test `(lambda (bar) (cons bar (lambda () (declare (dynamic-extent bar)))))
+ 'sb-ext:compiler-note)
+ (test `(lambda ()
+ (flet ((bar () t))
+ (cons #'bar (lambda () (declare (dynamic-extent #'bar))))))
+ 'sb-ext:compiler-note)))
|