Do not overwrite inherited structure accessor entries in infodb when
a sub-structure-class gets defined with same conc-name.
Fixes CAS access to slots of direct superclass instances in this
case (and in particular, non-futex safepoint builds).
(let* ((accessor-name (dsd-accessor-name dsd))
(dsd-type (dsd-type dsd)))
(when accessor-name
- (setf (info :function :structure-accessor accessor-name) dd)
(let ((inherited (accessor-inherited-data accessor-name dd)))
(cond
((not inherited)
+ (setf (info :function :structure-accessor accessor-name) dd)
(multiple-value-bind (reader-designator writer-designator)
(slot-accessor-transforms dd dsd)
(sb!xc:proclaim `(ftype (sfunction (,dtype) ,dsd-type)
(defstruct box
(word 0 :type sb-vm:word))
+;; Have the following tests check that CAS access to the superclass
+;; works in the presence of a subclass sharing the conc-name.
+(defstruct (subbox (:include box) (:conc-name "BOX-")))
+
(defun inc-box (box n)
(declare (fixnum n) (box box))
(loop repeat n