message
[sbcl.git] / src / compiler / constraint.lisp
index 1037b72..5e61da0 100644 (file)
                     (setq not-res (type-union not-res other-type)))
                   (let ((leaf-type (leaf-type leaf)))
                     (when (or (constant-p other)
-                              (and (csubtypep other-type leaf-type)
+                              (and (leaf-refs other) ; protect from deleted vars
+                                    (csubtypep other-type leaf-type)
                                    (not (type= other-type leaf-type))))
                       (change-ref-leaf ref other)
                       (when (constant-p other) (return)))))))
              (derive-node-type ref
                                (make-single-value-type
                                 (or (type-difference res not-res)
-                                    res)))))))
+                                    res)))
+             (maybe-terminate-block ref nil)))))
 
   (values))
 
              (return))))))
 
   (do-blocks (block component)
-    (use-result-constraints block))
+    (unless (block-delete-p block)
+      (use-result-constraints block)))
 
   (values))