0.7.8.7:
authorAlexey Dejneka <adejneka@comail.ru>
Mon, 30 Sep 2002 03:35:49 +0000 (03:35 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Mon, 30 Sep 2002 03:35:49 +0000 (03:35 +0000)
        Fixed bug 202: compiler failure on a function definition,
incompatible with the declared type.

BUGS
NEWS
src/compiler/ir1final.lisp
tests/compiler.impure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index de90432..9577381 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1240,27 +1240,13 @@ WORKAROUND:
 
     (FOO ' (1 . 2)) => "NIL IS INTEGER, Y = 1"
 
-202:
-  In 0.6.12.43 compilation of a function definition, contradicting its
-  FTYPE proclamation, causes an error, e.g. COMPILE-FILE on
+203:
+  Compiler does not check THEs on unused values, e.g. in
 
-    (declaim (ftype (function () null) foo))
-    (defun foo () t)
+    (progn (the real (list 1)) t)
 
-  fails with
-
-    debugger invoked on condition of type UNBOUND-VARIABLE:
-    The variable SB-C::*ERROR-FUNCTION* is unbound.
-
-  in
-
-    (SB-C::NOTE-LOSSAGE
-       "~@<The previously declared FTYPE~2I ~_~S~I ~_~
-                              conflicts with the definition type ~2I~_~S~:>"
-       (FUNCTION NIL NULL)
-       (FUNCTION NIL #))
-
-  (In 0.7.0 the variable was renamed to SB-C::*LOSSAGE-FUN*.)
+  This situation may appear during optimizing away degenerate cases of
+  certain functions: see bugs 54, 192b.
 
 DEFUNCT CATEGORIES OF BUGS
   IR1-#:
diff --git a/NEWS b/NEWS
index 5c4a21c..e470949 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1304,6 +1304,8 @@ changes in sbcl-0.7.9 relative to sbcl-0.7.8:
     Froyd porting Raymond Toy's fix to CMU CL)
   * improved MOP conformance in PCL (thanks to Nathan Froyd porting
     Gerd Moellman's work in CMU CL)
+  * fixed bug 202: the compiler failed on a function, which derived
+    type contradicted declared.
 
 planned incompatible changes in 0.7.x:
 * When the profiling interface settles down, maybe in 0.7.x, maybe
index 055322b..94240a0 100644 (file)
             (let ((declared-ftype (info :function :type source-name)))
               (unless (defined-ftype-matches-declared-ftype-p
                         defined-ftype declared-ftype)
-                (note-lossage "~@<The previously declared FTYPE~2I ~_~S~I ~_~
-                              conflicts with the definition type ~2I~_~S~:>"
-                              (type-specifier declared-ftype)
-                              (type-specifier defined-ftype)))))
+                (compiler-style-warn
+                  "~@<The previously declared FTYPE~2I ~_~S~I ~_~
+                   conflicts with the definition type ~2I~_~S~:>"
+                  (type-specifier declared-ftype)
+                  (type-specifier defined-ftype)))))
            (:defined
             (when global-p
               (setf (info :function :type source-name) defined-ftype))))))))
index d9ea3fb..98837d1 100644 (file)
@@ -420,6 +420,12 @@ BUG 48c, not yet fixed:
     (ignore-errors (bug110 0))
   (declare (ignore result))
   (assert (typep condition 'type-error)))
+
+;;; bug 202: the compiler failed to compile a function, which derived
+;;; type contradicted declared.
+(declaim (ftype (function () null) bug202))
+(defun bug202 ()
+  t)
 \f
 ;;;; tests not in the problem domain, but of the consistency of the
 ;;;; compiler machinery itself
index 8ea633f..c7bc9ab 100644 (file)
@@ -18,4 +18,4 @@
 ;;; internal versions off the main CVS branch, it gets hairier, e.g.
 ;;; "0.pre7.14.flaky4.13".)
 
-"0.7.8.6"
+"0.7.8.7"