EOF
expect_clean_compile $tmpfilename
-# This in an ideal world would fail, but at present it doesn't.
+# This in an ideal world would fail (that is, return with FAILURE-P
+# set), but at present it doesn't.
cat > $tmpfilename <<EOF
(in-package :cl-user)
(defun foo (x) (list x))
EOF
# expect_failed_compile $tmpfilename
+# This used to not warn, because the VALUES derive-type optimizer was
+# insufficiently precise.
+cat > $tmpfilename <<EOF
+ (in-package :cl-user)
+ (defun foo (x) (declare (ignore x)) (values))
+ (defun bar (x) (1+ (foo x)))
+EOF
+expect_failed_compile $tmpfilename
+
+# Even after making the VALUES derive-type optimizer more precise, the
+# following should still be clean.
+cat > $tmpfilename <<EOF
+ (in-package :cl-user)
+ (defun foo (x) (declare (ignore x)) (values))
+ (defun bar (x) (car x))
+EOF
+expect_clean_compile $tmpfilename
+
+# NOTINLINE on known functions shouldn't inhibit type inference
+# (spotted by APD sbcl-devel 2003-06-14)
+cat > $tmpfilename <<EOF
+ (in-package :cl-user)
+ (defun foo (x)
+ (declare (notinline list))
+ (1+ (list x)))
+EOF
+expect_failed_compile $tmpfilename
+
rm $tmpfilename
rm $compiled_tmpfilename