Different values computed in optimized vs. unopt code (random testing)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This was found by random testing on an SBCL x86 64 image built from source downloaded from github on 13/9/2017.
(defparameter *body*
'(deposit-field
(if (>= a 0)
0
131072)
(byte 12 14)
(logandc2 (* a c)
(unwind-
(defun ftest3 ()
(let ((fn1
`(lambda (a c)
(declare (type (integer -329826015068 198680020865) a))
(declare (type (integer -25542480 21150532) c))
(declare (optimize (safety 2) (debug 0) (space 0)
,*body*))
(fn2
`(lambda (a c)
,*body*))
(vals '(-25845520859 -20524970)))
(values
(apply (compile nil fn1) vals)
(apply (compile nil fn2) vals))))
(ftest3) ==> 530478540240461834, 530478540240592906
The first value appears to be incorrect.
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
By the way, this does not occur in 1.3.21.