From: Christophe R. <cr...@us...> - 2003-06-10 11:08:17
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1:/tmp/cvs-serv17275/tests Modified Files: compiler.test.sh Log Message: 0.8.0.59: Make VALUES derive type optimizer accurate: ... since we have this nice interpretation of VALUES types, use it in the VALUES derive-type optimizer -- we will return exactly as many values as VALUES has arguments; ... fix the bugs that this reveals in sbcl; :-) ... enables us to detect more bogosity: test for some more type mismatches being caught. ... (relatedly) fix one more duplicate definition in sb-bsd-sockets Array initializer type warning fix: ... don't do (csubtypep (ctype-of x) eltype), because that's wrong for e.g. X = #\a and eltype being STANDARD-CHAR; use CTYPEP instead. Index: compiler.test.sh =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/compiler.test.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- compiler.test.sh 9 Jun 2003 16:21:19 -0000 1.1 +++ compiler.test.sh 10 Jun 2003 11:08:13 -0000 1.2 @@ -155,7 +155,8 @@ 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)) @@ -166,6 +167,24 @@ (1+ (foo 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 rm $tmpfilename rm $compiled_tmpfilename |