Compiler does improper comparison, causing error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(defun bug232 (c)
(if (< 0 c)
(case c ((#\h) 0) (t 3))
0))
==>
The value
#\h
is not of type
REAL
[Condition of type TYPE-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD tid=13351 "repl-thread" RUNNING {10010A00A3}>)
Backtrace:
0: (SB-KERNEL:
1: (SB-VM::GENERIC->)
2: (SB-C::
3: (SB-C::
4: (SB-C::
5: (SB-C::
6: (SB-C::
7: (SB-C::
8: (SB-C::
9: (SB-C::
10: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME "<unknown>" {10039DF803}>)
11: (SB-C::
12: (SB-C::%COMPILE (SB-INT:
[...]
x86-64, "2.3.8.
Changed in sbcl: | |
status: | New → Fix Released |
The fix uses NUMBERP when it should use REALP. Change the bug to use #C(1 2) instead of #\h and the compiler still errors.