(eval '(defstruct bug-542807 slot)))
(assert (= 1 (length conds)))
(assert (typep (car conds) 'sb-kernel::redefinition-with-defun))))
+
+(with-test (:name :defmacro-not-list-lambda-list)
+ (assert (raises-error? (eval `(defmacro ,(gensym) "foo"))
+ type-error)))
+
+(with-test (:name :bug-308951)
+ (let ((x 1))
+ (dotimes (y 10)
+ (let ((y y))
+ (when (funcall (eval #'(lambda (x) (eql x 2))) y)
+ (defun bug-308951-foo (z)
+ (incf x (incf y z))))))
+ (defun bug-308951-bar (z)
+ (bug-308951-foo z)
+ (values x)))
+ (assert (= 4 (bug-308951-bar 1))))
+
+(declaim (inline bug-308914-storage))
+(defun bug-308914-storage (x)
+ (the (simple-array flt (*)) (bug-308914-unknown x)))
+
+(with-test (:name :bug-308914-workaround)
+ ;; This used to hang in ORDER-UVL-SETS.
+ (handler-case
+ (with-timeout 10
+ (compile nil
+ `(lambda (lumps &key cg)
+ (let ((nodes (map 'list (lambda (lump)
+ (bug-308914-storage lump))
+ lumps)))
+ (setf (aref nodes 0) 2)
+ (assert (every #'~= (apply #'concatenate 'list nodes) '(2 3 6 9)))))))
+ (sb-ext:timeout ()
+ (error "Hang in ORDER-UVL-SETS?"))))
\f
;;;; tests not in the problem domain, but of the consistency of the
;;;; compiler machinery itself
(test (double-float 0d0 0d0) 0d0)
(test (eql #\c) #\c))))
+(declaim (ftype (function () (integer 42 42)) bug-655581))
+(defun bug-655581 ()
+ 42)
+(declaim (notinline bug-655581))
+(test-util:with-test (:name :bug-655581)
+ (multiple-value-bind (type derived)
+ (funcall (compile nil `(lambda ()
+ (ctu:compiler-derived-type (bug-655581)))))
+ (assert derived)
+ (assert (equal '(integer 42 42) type))))
+
;;; success