(setf aref) on (simple-array (unsigned-byte 4) (*)) with constant index is incorrect.
From a bug report from Matt Kaufmann on cmucl-help, 2015-10-16:
; (declaim (optimize (safety 0))) ; safety 1 doesn't show the bug
; (load "bug.lsp")
; (compile-file "bug.lsp")
; (quit)
; ; Start cmucl again. Then:
; (load "bug.sse2f")
; (update-problem-stack-depth 1 *the-live-$sat*)
; ; The return value is #(#(0)) but should be #(#(1)).
(in-package "CL-USER")
(declaim (optimize (safety 0)))
(defun update-problem-stack-depth (v $sat)
(declare (type (integer 0 5) v))
(progn
(setf (aref (the (simple-array (integer 0 5) (1))
(svref $sat 0))
0)
(the (integer 0 5) v))
$sat))
(defparameter *the-live-$sat*
(coerce
(list
(make-array 1
:element-type '(integer 0 5)
:initial-element '0))
'vector))
It's enough to compile the example with (safety 0)
and load it. No need to quit and then load the fasl.