bug: EQUAL optimization is too agressive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
Consider this session in REPL:
[roman@myhost ~]$ sbcl
This is SBCL 1.0.46.10, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (declaim (optimize (debug 3) (speed 0) (safety 3)))
* (defun foo ()
(equal (list a b c) (make-array 9)))
; in: LAMBDA NIL
; (LIST A B C)
;
; caught WARNING:
; undefined variable: A
;
; caught WARNING:
; undefined variable: B
;
; caught WARNING:
; undefined variable: C
;
; compilation unit finished
; Undefined variables:
; A B C
; caught 3 WARNING conditions
FOO
* (foo)
NIL
* (sb-c::
Basic qualities:
COMPILATION-SPEED = 1
DEBUG = 3
SAFETY = 3
SPACE = 1
SPEED = 0
I expect to see the error message about A, B and C being undefined. Instead, the call returns NIL even with the most liberal optimization policy. LW, CLISP and Clozure signal the error for this code.
Changed in sbcl: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in sbcl: | |
assignee: | nobody → Roman Marynchak (roman-marynchak) |
status: | Triaged → In Progress |
tags: | removed: review |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Additional info: EQ and EQL have the same problem, but EQUALP works fine.