test for bug 308941
[sbcl.git] / tests / compiler.impure.lisp
index 230c2d0..d437d1c 100644 (file)
            (cdr (assoc symbol exported-symbols-alist)))))
      :load nil)))
 
+(test-util:with-test (:name :bug-308941)
+  (multiple-value-bind (warn fail)
+      (let ((*check-consistency* t))
+        (ctu:file-compile
+         "(eval-when (:compile-toplevel :load-toplevel :execute)
+            (defstruct foo3))
+          (defstruct bar
+            (foo #.(make-foo3)))"
+         :load nil))
+    ;; ...but the compiler should not break.
+    (assert (and warn fail))))
+
 ;;; success