Unexpected undefined function error with sb-rotate-byte, inline, let
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Douglas Katzman |
Bug Description
When entering the following sequence of expressions at the REPL the last one signals an error. I expected it not to, but instead to return 0.
This is SBCL 1.2.8.71-894fc3c, x86-64, linux, built with default options.
(require 'sb-rotate-byte)
(declaim (inline f))
(defun f (x)
(declare (type (unsigned-byte 64) x))
(setf x (sb-rotate-
(setf x (sb-rotate-
(let () (f 0))
; in: LET ()
; (F 0)
; --> BLOCK SETF SETQ THE SB-ROTATE-
; --> SB-ROTATE-
; ==>
; (SB-ROTATE-
;
; caught STYLE-WARNING:
; Lisp error during constant folding:
; The function SB-ROTATE-
;
; compilation unit finished
; caught 1 STYLE-WARNING condition
debugger invoked on a UNDEFINED-FUNCTION in thread
#<THREAD "main thread" RUNNING {1002D7E9E3}>:
The function SB-ROTATE-
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
("undefined function")
0] backtrace
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1002D7E9E3}>
0: ("undefined function")
1: ((LAMBDA ()))
2: (SB-INT:
3: (EVAL (LET NIL (F 0)))
4: (INTERACTIVE-EVAL (LET NIL (F 0)) :EVAL NIL)
5: (SB-IMPL::REPL-FUN NIL)
6: ((LAMBDA NIL :IN SB-IMPL:
7: (SB-IMPL:
8: (SB-IMPL:
9: (SB-IMPL:
10: ((FLET #:WITHOUT-
11: ((LABELS SB-IMPL:
0]
Regards,
Lutz
Changed in sbcl: | |
assignee: | nobody → Douglas Katzman (dougk) |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
I have bisected this to:
295fdbaa30b5712 8da30e1e5fb0c65 3dd20f46d1 is the first bad commit 8da30e1e5fb0c65 3dd20f46d1
commit 295fdbaa30b5712
Author: Nikodemus Siivola <email address hidden>
Date: Thu Dec 1 21:05:43 2011 +0200
don't simplify (LET () ..) => (LOCALLY ...) in the simple evalutor
If LET is at toplevel its subforms are not.
If LOCALLY is at toplevel its subforms are also at toplevel.
That is SBCL 1.0.54.20.