mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Fix broken byte-compilation of unary comparisons
* lisp/emacs-lisp/byte-opt.el (byte-opt--nary-comparison): Fix a typo causing miscompilation of code such as (OP X), where OP is <, >, <=, >= or =. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case. Reported by Richard Copley.
This commit is contained in:
parent
b4063c399b
commit
27944247d1
2 changed files with 6 additions and 1 deletions
|
|
@ -780,6 +780,11 @@ inner loops respectively."
|
|||
;; (+ 0 -0.0) etc
|
||||
(let ((x (bytecomp-test-identity -0.0)))
|
||||
(list x (+ x) (+ 0 x) (+ x 0) (+ 1 2 -3 x) (+ 0 x 0)))
|
||||
|
||||
;; Unary comparisons: keep side-effect, return t
|
||||
(let ((x 0))
|
||||
(list (= (setq x 1))
|
||||
x))
|
||||
)
|
||||
"List of expressions for cross-testing interpreted and compiled code.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue