diff --git a/src/compiler/generic/vm-tran.lisp b/src/compiler/generic/vm-tran.lisp index a0c1e4f89..983b98ba7 100644 --- a/src/compiler/generic/vm-tran.lisp +++ b/src/compiler/generic/vm-tran.lisp @@ -268,7 +268,7 @@ (let ((data (truly-the (simple-array ,element-type-specifier 1) data))) ,(if stringp `(if (simple-base-string-p data) - (data-vector-set (truly-the (simple-array base-char (*)) data) index (the base-char ,new-value)) + (data-vector-set (truly-the (simple-array base-char (*)) data) index (the* (base-char :silent-conflict t) ,new-value)) (data-vector-set (truly-the (simple-array character (*)) data) index (the character ,new-value))) `(data-vector-set data index ,new-value)) ,truly-new-value)))))) diff --git a/tests/array.pure.lisp b/tests/array.pure.lisp index 27d8b3309..de550a526 100644 --- a/tests/array.pure.lisp +++ b/tests/array.pure.lisp @@ -1166,3 +1166,9 @@ (lambda (x n) (aref (if n (the string n) #(1 2)) x)) (or (integer 1 2) character))) + +#+sb-unicode +(with-test (:name :char-base-char-warning) + (checked-compile + `(lambda (s) + (setf (char s 0) (code-char 233))))) diff --git a/tests/utf-8.impure.lisp b/tests/utf-8.impure.lisp index 6ffe631bc..0f1023f67 100644 --- a/tests/utf-8.impure.lisp +++ b/tests/utf-8.impure.lisp @@ -334,6 +334,7 @@ (error "~s" vector)))))) (free-protected-array string)))) +#+(or arm64 x86-64) (with-test (:name :character-string-to-utf8) (flet ((run-test (string obuf vector) (loop repeat (* 256 #+slow 10)