mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 11:34:09 +02:00
Fix fixnum-range changes in R6RS fixnum bitops
* module/rnrs/arithmetic/fixnums.scm (fxcopy-bit, fxbit-field) (fxcopy-bit-field, fxarithmetic-shift) (fxarithmetic-shift-left, fx-arithmetic-shift-right) (fxrotate-bit-field, fxreverse-bit-field): Enforce range on amount by which to shift. Fixes #14917. * test-suite/tests/r6rs-arithmetic-fixnums.test ("fxarithmetic-shift-left"): Update test to not shift left by a negative amount.
This commit is contained in:
parent
845c873acf
commit
beea6302e0
2 changed files with 26 additions and 4 deletions
|
@ -202,7 +202,7 @@
|
|||
(fx=? (fxarithmetic-shift -1 -1) -1))))
|
||||
|
||||
(with-test-prefix "fxarithmetic-shift-left"
|
||||
(pass-if "simple" (fx=? (fxarithmetic-shift-left -6 -1) -3)))
|
||||
(pass-if "simple" (fx=? (fxarithmetic-shift-left -6 1) -12)))
|
||||
|
||||
(with-test-prefix "fxarithmetic-shift-right"
|
||||
(pass-if "simple" (fx=? (fxarithmetic-shift-right -6 1) -3)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue