Ideally, the compiler would consider all type declarations to be assertions, so that adding type declarations to a program, no matter how incorrect they might be, would never cause undefined behavior. However, the compiler is known to fall short of this goal in two areas:
(defun foo (x) (the integer (bar x)))
causes the following compiler diagnostic to be emitted:
; note: type assertion too complex to check: ; (VALUES INTEGER &REST T).
A partial workaround is instead write:
(defun foo (x) (the (values integer &optional) (bar x)))
These are important issues, but are not necessarily easy to fix, so they may, alas, remain in the system for a while.