+
+;;; MISC.437: lost reoptimization after FLUSH-DEST
+(assert (zerop (funcall
+ (compile
+ nil
+ '(lambda (a b c d e)
+ (declare (notinline values complex eql))
+ (declare
+ (optimize (compilation-speed 3)
+ (speed 3)
+ (debug 1)
+ (safety 1)
+ (space 0)))
+ (flet ((%f10
+ (f10-1 f10-2 f10-3
+ &optional (f10-4 (ignore-errors 0)) (f10-5 0)
+ &key &allow-other-keys)
+ (if (or (eql 0 0) t) 0 (if f10-1 0 0))))
+ (complex (multiple-value-call #'%f10 (values a c b 0 0)) 0))))
+ 80043 74953652306 33658947 -63099937105 -27842393)))
+
+;;; bug #351 -- program-error for malformed LET and LET*, including those
+;;; resulting from SETF of LET.
+(dolist (fun (list (compile nil '(lambda () (let :bogus-let :oops)))
+ (compile nil '(lambda () (let* :bogus-let* :oops)))
+ (compile nil '(lambda (x) (push x (let ((y 0)) y))))))
+ (assert (functionp fun))
+ (multiple-value-bind (res err) (ignore-errors (funcall fun))
+ (assert (not res))
+ (assert (typep err 'program-error))))
+
+(let ((fun (compile nil '(lambda (x) (random (if x 10 20))))))
+ (dotimes (i 100 (error "bad RANDOM distribution"))
+ (when (> (funcall fun nil) 9)
+ (return t)))
+ (dotimes (i 100)
+ (when (> (funcall fun t) 9)
+ (error "bad RANDOM event"))))