summaryrefslogtreecommitdiff
path: root/libraries/ghc-bignum/src/GHC
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-07-30 10:19:14 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-30 22:56:03 -0400
commit380638a33691ba43fdcd2e18bca636750e5f66f1 (patch)
tree6ff565e6f41f1e17583554a732db64beb1eaa8ec /libraries/ghc-bignum/src/GHC
parent175cb5b4044e6f4ad2224f54115f42e7a8b08f9b (diff)
downloadhaskell-380638a33691ba43fdcd2e18bca636750e5f66f1.tar.gz
Bignum: fix powMod for gmp backend (#18515)
Also reenable integerPowMod test which had never been reenabled by mistake.
Diffstat (limited to 'libraries/ghc-bignum/src/GHC')
-rw-r--r--libraries/ghc-bignum/src/GHC/Num/BigNat/GMP.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/ghc-bignum/src/GHC/Num/BigNat/GMP.hs b/libraries/ghc-bignum/src/GHC/Num/BigNat/GMP.hs
index cb1fe500d9..965b7c76ec 100644
--- a/libraries/ghc-bignum/src/GHC/Num/BigNat/GMP.hs
+++ b/libraries/ghc-bignum/src/GHC/Num/BigNat/GMP.hs
@@ -349,7 +349,8 @@ bignat_powmod
-> State# RealWorld
-> State# RealWorld
bignat_powmod r b e m s =
- ioVoid (integer_gmp_powm# r b (wordArraySize# b) e (wordArraySize# e) m (wordArraySize# m)) s
+ case ioInt# (integer_gmp_powm# r b (wordArraySize# b) e (wordArraySize# e) m (wordArraySize# m)) s of
+ (# s', n #) -> mwaSetSize# r (narrowGmpSize# n) s'
----------------------------------------------------------------------