diff --git a/ansi-tests/define-compiler-macro.lsp b/ansi-tests/define-compiler-macro.lsp
index 8026dd316fe00f8f8356e5dcf53e4a5a63e70810..e7f83ccd9d5d37b5c109f2424b993f8799b6abbf 100644
--- a/ansi-tests/define-compiler-macro.lsp
+++ b/ansi-tests/define-compiler-macro.lsp
@@ -154,3 +154,22 @@
 		5 11)
        *x*)))
   (5 11) :good)
+
+(deftest define-compiler-macro.8
+  (let* ((sym (gensym))
+	 (form `(define-compiler-macro ,sym (x y)
+		  (declare (special *x*))
+		  (setf *x* :bad)
+		  `(list ,x ,y)))
+	 (form2 `(defmacro ,sym (x y) `(list ,x ,y))))
+    (eval form)
+    (eval form2)
+    (let ((*x* :good))
+      (declare (special *x*))
+      (values
+       (funcall (compile nil `(lambda (a b)
+				(declare (notinline ,sym))
+				(,sym a b)))
+		7 23)
+       *x*)))
+  (7 23) :good)