deleting unreachable code inside inlined functions
Bug #509023 reported by
Stas Boukarev
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
Compiling the following file results in some weird code deletion notes. This is very annoying.
(declaim (inline inlined))
(defun inlined (n)
(if (evenp n)
(+ 1 n)
(+ 2 n))) ;; note: deleting unreachable code
(defun test-1 ()
(inlined 2))
;;; when inlined function is in a different file
(defun test-2 (number)
(mod number 10)) ;; note: deleting unreachable code
(defun test-3 (n)
(mod n 10)) ;; but no note here, since it doesn't share a variable named "number" with MOD
tags: | added: deletion-note |
Changed in sbcl: | |
status: | Confirmed → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
In the first case it would be good to give the code deletion note for "INLINED in TEST-1" or equivalent -- or possibly even elide it completely. I'm not entirely sure I've ever seen a code deletion note along these lines that was actually useful.
In the second case MOD is to blame -- it should not used NUMBER as a name. (Or the heuristic is to blame, but since I don't have a better idea to offer...)