diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-03-02 17:23:12 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-03-03 20:36:12 +0100 |
commit | 0c5ba41b72a19f5353083431a1817d86bc3b7fad (patch) | |
tree | 354266f25e8a38b611314a0c7658b55f9675d168 /test/src | |
parent | 30810905de7662b36b7ac9275bb9cbb2a563c277 (diff) | |
download | emacs-0c5ba41b72a19f5353083431a1817d86bc3b7fad.tar.gz emacs-0c5ba41b72a19f5353083431a1817d86bc3b7fad.tar.bz2 emacs-0c5ba41b72a19f5353083431a1817d86bc3b7fad.zip |
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.
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/comp-test-funcs.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 5bae743d153..a465026fb37 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -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 |