Hi folks, I was taking a look at SB-COVER to see how usable it is for us, and it isn't very.
Here's an extremely simple function which when placed in a file all by itself causes compile-file to return T and T for the warning & failure results.

(defun foo (x)
  (declare (optimize sb-c:store-coverage-data))
  (declare (fixnum x))
  (let ((y (typecase x
             (integer x)
             (string (length x)))))
    (- y)))
--> 
; caught WARNING:
;   Derived type of X is (VALUES FIXNUM &OPTIONAL), conflicting with its asserted type SEQUENCE.

I'll concede that one would not write that literally, at least not by hand; however it's extremely easy to get into the situation depicted when the form which computes the value for Y is a fairly general macro or inline function which dispatches on type. The declaration in the containing function is to allow static elision of the type check. It's not, in general, as contrived as the above code appears to be.

The fix seems easy, but I'm trying to guess Juho's intent behind the lines causing the problem.  What happens is that the source transform on TYPEP is disabled when doing coverage. The effect is that within Y's initializer, the compiler understands nothing about types.  It's as if the binding form were like so:
  (let ((y (cond ((mystery-predicate1 x) x)
                     ((mystery-predicate2 x) (length x)))))
Clearly this is bad code because the second arm might be reachable (rather: isn't known to be unreachable) and LENGTH is illegal on a known fixnum as X was declared to be.

Since this problem is really quite prevalent, I think we have to delete the lines that were added to inhibit the optimization:

diff --git a/src/compiler/typetran.lisp b/src/compiler/typetran.lisp
index 8733eb4..767a19d 100644
--- a/src/compiler/typetran.lisp
+++ b/src/compiler/typetran.lisp
@@ -642,9 +642,7 @@
   ;; weird roundabout way. -- WHN 2001-03-18
   (if (and (not env)
            (consp spec)
-           (eq (car spec) 'quote)
-           (or (not *allow-instrumenting*)
-               (policy *lexenv* (= store-coverage-data 0))))
+           (eq (car spec) 'quote))

I imagine this must have had something to do with trying to get good coverage by _not_ statically eliding code. In other words, I think the intent was to explicitly show paths as 'not taken' by having all paths exist. But this is sort of a more general problem and I don't understand why TYPEP was singled out. Any ideas?