From 6b09941b30bc039107b884a73b7299f4b52ba8e3 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Tue, 25 Oct 2011 10:13:58 -0400 Subject: [PATCH] Fix debug.impure.lisp / BUG-310175 for :stack-allocatable-lists targets. * Not all platforms stack-allocate. Some platforms (PPC) stack- allocate some things, but not most things. * PPC, in particular, stack allocates for LIST and LIST* (the :stack-allocatable-lists feature), but doesn't stack allocate for CONS. And it turns out that the compiler transforms one-arg-LIST and two-arg-LIST* to CONS. * Use two-arg-LIST to force the :stack-allocatable-lists code path, and mark the test as failing on non-:stack-allocatable-lists targets. --- tests/debug.impure.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index a4c6114..01ab29a 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -480,8 +480,12 @@ (load (compile-file "bug-414.lisp")) (disassemble 'bug-414))) -(with-test (:name :bug-310175) - (let ((dx-arg (cons t t))) +(with-test (:name :bug-310175 :fails-on '(not :stack-allocatable-lists)) + ;; KLUDGE: Not all DX-enabled platforms DX CONS, and the compiler + ;; transforms two-arg-LIST* (and one-arg-LIST) to CONS. Therefore, + ;; use two-arg-LIST, which should get through to VOP LIST, and thus + ;; stack-allocate on a predictable set of machines. + (let ((dx-arg (list t t))) (declare (dynamic-extent dx-arg)) (flet ((dx-arg-backtrace (x) (declare (optimize (debug 2))) -- 1.7.10.4