X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdynamic-extent.impure.lisp;h=704a55d183aa1bc2de2b1f7acf2c6d9d2110dce0;hb=66cff1e1319861c080d563359afea284614b3a7f;hp=85793838f885cb4520cd59d626eba20f2feb360d;hpb=42ab0c5b87f834c69842713c60587a76f953411f;p=sbcl.git diff --git a/tests/dynamic-extent.impure.lisp b/tests/dynamic-extent.impure.lisp index 8579383..704a55d 100644 --- a/tests/dynamic-extent.impure.lisp +++ b/tests/dynamic-extent.impure.lisp @@ -138,6 +138,14 @@ (declare (dynamic-extent #'f)) (true #'f)))) +;;; CONS + +(defun-with-dx cons-on-stack (x) + (let ((cons (cons x x))) + (declare (dynamic-extent cons)) + (true cons) + nil)) + ;;; with-spinlock should use DX and not cons (defvar *slock* (sb-thread::make-spinlock :name "slocklock")) @@ -176,6 +184,7 @@ (assert-no-consing (test-let-var-subst2 17)) (assert-no-consing (test-lvar-subst 11)) (assert-no-consing (dx-value-cell 13)) + (assert-no-consing (cons-on-stack 42)) ;; Not strictly DX.. (assert-no-consing (test-hash-table)) #+sb-thread