move-return-stuff into deleted lambda
The bug reported by Eric Marsden reduces into
(defun foo ()
(declare (optimize (debug 1)))
(lambda () (return)))
(labels ((l () (l))
(%f (a &key)
(%f (return-from foo))
=> failed AVER: (SINGLETON-P SB-C::SUCC)
This is caused by move-return-stuff deleting and unlinking the return node, it only does so if the return block is deleted. And normally delete-block would handle that, but move-return-stuff points the callee return node to the caller lambda. Now the caller has two returns pointing to it, and delete-return can't handle being called twice on the same lambda.
Now unlink-node fails because the return is the only node in the deleted block, and the block has no successors, unlink-node can't handle that.
Why is move-return-stuff called on deleted stuff? It's coming from MAYBE-CONVERT-