From 32477f9188f8928a1d00af83217bc962e4d32e12 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Wed, 7 Apr 2004 15:03:01 +0000
Subject: [PATCH] Change (unsigned-byte ,width) to (integer 0 ,(1- (ash 1
 width))) because when width is 0, (unsigned-byte 0) is invalid and we really
 wanted (integer 0 0) anyway.

Happens when deriving the type of (logand x 0).
---
 compiler/srctran.lisp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/srctran.lisp b/compiler/srctran.lisp
index c41287a96..56efae391 100644
--- a/compiler/srctran.lisp
+++ b/compiler/srctran.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.146 2004/04/07 02:47:53 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.147 2004/04/07 15:03:01 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -3641,7 +3641,11 @@
                             (not (and (eq fun-name 'logand)
                                       (csubtypep
                                        (single-value-type (node-derived-type node))
-                                       (specifier-type `(unsigned-byte ,width))))))
+				       ;; This is (unsigned-byte
+				       ;; width), but if width is 0,
+				       ;; (unsigned-byte 0) isn't
+				       ;; valid.
+                                       (specifier-type `(integer 0 ,(1- (ash 1 width))))))))
 		   (let ((name (etypecase modular-fun
 				 ((eql :good) fun-name)
 				 (modular-fun-info
-- 
GitLab