139 |
i a b)) |
i a b)) |
140 |
10.0f0 2 1 2) |
10.0f0 2 1 2) |
141 |
|
|
142 |
|
;;; Constant folding test |
143 |
|
;;; If the coerce call is folded to a constant, this will fail |
144 |
|
;;; when that constant is modified. |
145 |
|
|
146 |
|
(deftest coerce.fold.1 |
147 |
|
(flet ((%f () (declare (optimize speed (safety 0))) |
148 |
|
(coerce '(1 2 3) 'vector))) |
149 |
|
(values |
150 |
|
(%f) |
151 |
|
(let ((v (%f))) |
152 |
|
(setf (aref v 0) 0) |
153 |
|
v) |
154 |
|
(%f))) |
155 |
|
#(1 2 3) |
156 |
|
#(0 2 3) |
157 |
|
#(1 2 3)) |
158 |
|
|
159 |
|
|
160 |
;;; Error tests |
;;; Error tests |
161 |
|
|
162 |
;;; (deftest coerce.error.1 |
;;; (deftest coerce.error.1 |
216 |
(t t))) |
(t t))) |
217 |
(error (c) (declare (ignore c)) t)))) |
(error (c) (declare (ignore c)) t)))) |
218 |
t) |
t) |
|
|
|