Strange code deletion note
Bug #1036962 reported by
Stas Boukarev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Low
|
Unassigned |
Bug Description
(declaim (inline test test-2))
(defun test-2 (n address &optional (offset 0))
(declare (sb-ext:
(ecase n
(1 (sb-sys:sap-ref-8 address offset))
(3 (sb-sys:sap-ref-32 address offset))))
(defun test (n stream)
(declare (sb-ext:
(test-2 n stream))
(defun foo (stream)
(the (unsigned-byte 8) (test 1 stream)))
; in: DEFUN FOO
; (THE (UNSIGNED-BYTE 8) (TEST 1 STREAM))
;
; note: deleting unreachable code
Removing THE (UNSIGNED-BYTE 8) gets rid of it, calling test-2 directly gets rid of it too, as does calling (test 3 stream).
To post a comment you must log in.
Unable to reproduce with 1.3.9.74-b7f16a3, either as individual forms pasted at the REPL or via COMPILE-FILE.