mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix two compiler ICEs dealing with nan and infinity
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Don't crash when truncate fails. * test/src/comp-test-funcs.el (comp-test-=-nan): Add two functions to be compiled.
This commit is contained in:
parent
30810905de
commit
0c5ba41b72
2 changed files with 14 additions and 3 deletions
|
|
@ -871,9 +871,12 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
|
|||
;; precisely as an integer add the integer as well.
|
||||
(cl-loop
|
||||
for v in (valset cstr)
|
||||
when (and (floatp v)
|
||||
(= v (truncate v)))
|
||||
do (push (cons (truncate v) (truncate v)) (range cstr)))
|
||||
do
|
||||
(when-let* ((ok (floatp v))
|
||||
(truncated (ignore-error 'overflow-error
|
||||
(truncate v)))
|
||||
(ok (= v truncated)))
|
||||
(push (cons truncated truncated) (range cstr))))
|
||||
(cl-loop
|
||||
with vals-to-add
|
||||
for (l . h) in (range cstr)
|
||||
|
|
|
|||
|
|
@ -667,6 +667,14 @@
|
|||
(while (comp-test-no-return-3)
|
||||
(comp-test-no-return-3))))
|
||||
|
||||
(defun comp-test-=-nan (x)
|
||||
(when (= x 0.0e+NaN)
|
||||
x))
|
||||
|
||||
(defun comp-test-=-infinity (x)
|
||||
(when (= x 1.0e+INF)
|
||||
x))
|
||||
|
||||
(provide 'comp-test-funcs)
|
||||
|
||||
;;; comp-test-funcs.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue