Update of /cvsroot/sbcl/sbcl/tests
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6590/tests
184.108.40.206: fix failing AVER in CONVERT-MV-CALL
Patch by Larry D'Anna.
Ever since Spice Lisp, convert-mv-call had returned without doing
anything if (functional-entry-fun fun) is not null, ie if fun
possesses a XEP. 0.8.5.5 replaces this criterion with "if the last
optional entry has references", and signals an error if the last
optional entry has no references and the XEP exists.
I can't know exactly what Alexy was thinking when he put the aver
in, but I can guess: If the XEP exists it should contain a
reference to the last entry point, so if the last entry point has
no refs and a XEP exists something went wrong. However, if the
number of required + optional arguments is 0, then XEP doesn't need
the "last" entry point, it can always use the "more" entry point
instead, which is exactly what seems to have happened in this case.
This patch combines the two conditions. convert-mv-call will return
without action if *either* a XEP exists, *or* the last optional
entry has references."
RCS file: /cvsroot/sbcl/sbcl/tests/compiler.pure.lisp,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- compiler.pure.lisp 31 Jul 2009 12:14:01 -0000 1.202
+++ compiler.pure.lisp 31 Jul 2009 13:00:18 -0000 1.203
@@ -3211,3 +3211,12 @@
(test `(lambda (x) (declare (double-float x)) (* x 2)) 123.45d0 246.9d0)
(test `(lambda (x) (declare (double-float x)) (* x 2.0)) 543.21d0 1086.42d0)
(test `(lambda (x) (declare (double-float x)) (* x 2.0d0)) 42.0d0 84.0d0)))
+(with-test (:name :bug-392203)
+ ;; Used to hit an AVER in COMVERT-MV-CALL.
+ (assert (zerop
+ (compile nil
+ `(lambda ()
+ (flet ((k (&rest x) (declare (ignore x)) 0))
+ (multiple-value-call #'k #'k))))))))