From 3c76429562383ac91cec4880b7b86234362e1ed4 Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Sun, 29 Sep 2002 07:03:18 +0000 Subject: [PATCH 1/1] 0.7.8.5: Removed obsolete bug entries 110 and 153. --- BUGS | 38 -------------------------------------- tests/compiler.impure.lisp | 44 ++++++++++++++++++++++++++++++++++++++++++++ version.lisp-expr | 2 +- 3 files changed, 45 insertions(+), 39 deletions(-) diff --git a/BUGS b/BUGS index 33b9fee..de90432 100644 --- a/BUGS +++ b/BUGS @@ -184,7 +184,6 @@ WORKAROUND: (FOO 1.5) will cause the INTEGERP case to be selected, giving bogus output a la exactly 2.5 - (or (FOO 1000.5), "exactly 1001.5") This violates the "declarations are assertions" principle. According to the ANSI spec, in the section "System Class FUNCTION", this is a case of "lying to the compiler", but the lying is done @@ -555,24 +554,6 @@ WORKAROUND: time trying to GC afterwards. Surely there's some more economical way to implement (ROOM T). -110: - reported by Martin Atzmueller 2001-06-25; originally from CMU CL bugs - collection: - ;;; The compiler is flushing the argument type test, and the default - ;;; case in the cond, so that calling with say a fixnum 0 causes a - ;;; SIGBUS. - (declaim (optimize (safety 2) (speed 3))) - (defun tst (x) - (declare (type (or string stream) x)) - (cond ((typep x 'string) 'string) - ((typep x 'stream) 'stream) - (t - 'none))) - The symptom in sbcl-0.6.12.42 on OpenBSD is actually (TST 0)=>STREAM - (not the SIGBUS reported in the comment) but that's broken too; - type declarations are supposed to be treated as assertions unless - SAFETY 0, so we should be getting a TYPE-ERROR. - 115: reported by Martin Atzmueller 2001-06-25; originally from CMU CL bugs collection: @@ -871,25 +852,6 @@ WORKAROUND: issues were cleaned up. As of sbcl-0.7.1.9, it occurs in NODE-BLOCK called by LAMBDA-COMPONENT called by IR2-CONVERT-CLOSURE. -153: - (essentially the same problem as a CMU CL bug reported by Martin - Cracauer on cmucl-imp 2002-02-19) - There is a hole in structure slot type checking. Compiling and LOADing - (declaim (optimize safety)) - (defstruct foo - (bla 0 :type fixnum)) - (defun f () - (let ((foo (make-foo))) - (setf (foo-bla foo) '(1 . 1)) - (format t "Is ~a of type ~a a cons? => ~a~%" - (foo-bla foo) - (type-of (foo-bla foo)) - (consp (foo-bla foo))))) - (f) - should signal an error, but in sbcl-0.7.1.21 instead gives the output - Is (1 . 1) of type CONS a cons? => NIL - without signalling an error. - 157: Functions SUBTYPEP, TYPEP, UPGRADED-ARRAY-ELEMENT-TYPE, and UPGRADED-COMPLEX-PART-TYPE should have an optional environment argument. diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 0bbcdf9..d9ea3fb 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -376,6 +376,50 @@ BUG 48c, not yet fixed: (ignore-errors (the-in-arguments-2 1)) (assert (null result)) (assert (typep condition 'type-error))) + +;;; bug 153: a hole in a structure slot type checking +(declaim (optimize safety)) +(defstruct foo153 + (bla 0 :type fixnum)) +(defun bug153-1 () + (let ((foo (make-foo153))) + (setf (foo153-bla foo) '(1 . 1)) + (format t "Is ~a of type ~a a cons? => ~a~%" + (foo153-bla foo) + (type-of (foo153-bla foo)) + (consp (foo153-bla foo))))) +(defun bug153-2 (x) + (let ((foo (make-foo153))) + (setf (foo153-bla foo) x) + (format t "Is ~a of type ~a a cons? => ~a~%" + (foo153-bla foo) + (type-of (foo153-bla foo)) + (consp (foo153-bla foo))))) + +(multiple-value-bind (result condition) + (ignore-errors (bug153-1)) + (declare (ignore result)) + (assert (typep condition 'type-error))) +(multiple-value-bind (result condition) + (ignore-errors (bug153-2 '(1 . 1))) + (declare (ignore result)) + (assert (typep condition 'type-error))) + +;;; bug 110: the compiler flushed the argument type test and the default +;;; case in the cond. + +(defun bug110 (x) + (declare (optimize (safety 2) (speed 3))) + (declare (type (or string stream) x)) + (cond ((typep x 'string) 'string) + ((typep x 'stream) 'stream) + (t + 'none))) + +(multiple-value-bind (result condition) + (ignore-errors (bug110 0)) + (declare (ignore result)) + (assert (typep condition 'type-error))) ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself diff --git a/version.lisp-expr b/version.lisp-expr index 429947e..f16daa4 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; internal versions off the main CVS branch, it gets hairier, e.g. ;;; "0.pre7.14.flaky4.13".) -"0.7.8.4" +"0.7.8.5" -- 1.7.10.4