1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 17:20:29 +02:00

Fix bug in comparison between real and complex

This bug was introduced by 35a9059250.

* module/language/cps/specialize-numbers.scm (specialize-operations):
  Check that both operands are real as a condition for
  specialize-f64-comparison.
* test-suite/tests/numbers.test: Add test.
This commit is contained in:
Daniel Llorens 2017-03-09 15:13:19 +01:00
parent 7cdfaaada9
commit 7de77bf7d8
2 changed files with 17 additions and 6 deletions

View file

@ -5425,3 +5425,12 @@
(test-ash-variant 'ash ash floor)
(test-ash-variant 'round-ash round-ash round))
;;;
;;; regressions
;;;
(with-test-prefix/c&e "bug in unboxing f64 in 2.1.6"
(pass-if "= real and complex"
(= 1.0 (make-rectangular 1.0 0.0))))