+;; Used to run out of stack.
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep 'null '(or unk0 unk1))
+ (assert (not yes))
+ (assert (not win)))
+
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep '(and function instance) nil)
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep nil '(and function instance))
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep '(and function funcallable-instance) 'funcallable-instance)
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep 'funcallable-instance '(and function funcallable-instance))
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep 'stream 'instance)
+ (assert (not yes)))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep 'stream 'funcallable-instance)
+ (assert (not yes))
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep '(and stream instance) 'instance)
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep '(and stream funcallable-instance) 'funcallable-instance)
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep '(and stream instance) 'stream)
+ (assert yes)
+ (assert win))
+(multiple-value-bind (yes win)
+ (sb-xc:subtypep '(and stream funcallable-instance) 'stream)
+ (assert yes)
+ (assert win))
+
+(assert (type= (specifier-type 'nil)
+ (specifier-type '(and symbol funcallable-instance))))