X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=0e7c53c5128cb81a56772ff101294ba44aef6f0c;hb=ccd2a1d4ab60a9539472df45fc4f9ec7b7fdc7b7;hp=1a4fc7d23a2cf212a4e1d53e548594e71212f83e;hpb=0562f2b641c71b8461f9aac4a354ff4b341961fe;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 1a4fc7d..0e7c53c 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4383,3 +4383,17 @@ (compile nil `(lambda (x) (symbol-macrolet ((sv x)) (values (svref sv 0) (setf (svref sv 0) 99)))))) + +;; The compiler used to update the receiving LVAR's type too +;; aggressively when converting a large constant to a smaller +;; (potentially signed) one, causing other branches to be +;; inferred as dead. +(with-test (:name :modular-cut-constant-to-width) + (let ((test (compile nil + `(lambda (x) + (logand 254 + (case x + ((3) x) + ((2 2 0 -2 -1 2) 9223372036854775803) + (t 358458651))))))) + (assert (= (funcall test -10470605025) 26))))