GET-CAS-EXPANSION of SYMBOL-VALUE buggy for quoted symbol
The DEFINE-CAS-EXPANDER in 'late-cas.lisp' has an optimization that goes awry.
Assume that the symbol FROB has not been proclaimed special or global.
(get-cas-expansion '(symbol-value 'frob)) =>
(DECLARE (SYMBOL NIL))
1a. The type-check eschews use of (THE <type> new), deferring to ABOUT-TO-MODIFY, but passes NIL instead of 'FROB
b. The update form passes NIL to %COMPARE-AND-SWAP. (These are the same problem obviously)
2. The volatile read uses SYMBOL-GLOBAL-VALUE but that's not right because CAS swaps the dynamic binding per this example:
* (defvar x "hi")
* (progn (let ((x 9)) (print (cas (symbol-value 'x) 9 12)) (print x)) x)
prints 9, 12, "hi"
Compare to otherwise correct expansion, barring the last return value, for a non-constant symbol:
* (get-cas-expansion '(symbol-value x)) =>
(DECLARE (SYMBOL #:X637))
Tested in SBCL 126.96.36.199-c8fedad