+(defvar *a-cons* (cons nil nil))
+
+#+stack-allocatable-closures
+(with-test (:name (:no-consing :dx-closures))
+ (assert-no-consing (dxclosure 42)))
+
+#+stack-allocatable-lists
+(with-test (:name (:no-consing :dx-lists))
+ (assert-no-consing (dxlength 1 2 3))
+ (assert-no-consing (dxlength t t t t t t))
+ (assert-no-consing (dxlength))
+ (assert-no-consing (dxcaller 1 2 3 4 5 6 7))
+ (assert-no-consing (test-nip-values))
+ (assert-no-consing (test-let-var-subst2 17))
+ (assert-no-consing (test-lvar-subst 11))
+ (assert-no-consing (nested-dx-lists))
+ (assert-consing (nested-dx-not-used *a-cons*))
+ (assert-no-consing (nested-evil-dx-used *a-cons*))
+ (assert-no-consing (multiple-dx-uses)))
+
+(with-test (:name (:no-consing :dx-value-cell))
+ (assert-no-consing (dx-value-cell 13)))
+
+#+stack-allocatable-fixed-objects
+(with-test (:name (:no-consing :dx-fixed-objects))
+ (assert-no-consing (cons-on-stack 42))
+ (assert-no-consing (make-foo1-on-stack 123))
+ (assert-no-consing (nested-good 42))
+ (assert-no-consing (nested-dx-conses))
+ (assert-no-consing (dx-handler-bind 2))
+ (assert-no-consing (dx-handler-case 2)))
+
+#+stack-allocatable-vectors
+(with-test (:name (:no-consing :dx-vectors))
+ (assert-no-consing (force-make-array-on-stack 128))
+ (assert-no-consing (make-array-on-stack-1))
+ (assert-no-consing (make-array-on-stack-2 5 '(1 2.0 3 4.0 5)))
+ (assert-no-consing (make-array-on-stack-3 9 8 7))
+ (assert-no-consing (make-array-on-stack-4))
+ (assert-no-consing (make-array-on-stack-5))
+ (assert-no-consing (vector-on-stack :x :y)))
+
+#+raw-instance-init-vops
+(with-test (:name (:no-consing :dx-raw-instances) :fails-on :ppc)
+ (let (a b)
+ (setf a 1.24 b 1.23d0)
+ (assert-no-consing (make-foo2-on-stack a b)))
+ (assert-no-consing (make-foo3-on-stack)))
+
+;;; not really DX, but GETHASH and (SETF GETHASH) should not cons
+
+(defvar *table* (make-hash-table))
+
+(defun test-hash-table ()
+ (setf (gethash 5 *table*) 13)
+ (gethash 5 *table*))
+
+;; This fails on threaded PPC because the hash-table implementation
+;; uses recursive system spinlocks, which cons (see below for test
+;; (:no-consing :spinlock), which also fails on threaded PPC).
+(with-test (:name (:no-consing :hash-tables) :fails-on '(and :ppc :sb-thread))
+ (assert-no-consing (test-hash-table)))
+