Skip to content

Division by zero in bigNatRemWord

Summary

Out of luck I realized the following warning which I can only see if I run the command manually but not during a build done via hadrian. Thus I'm not sure whether this is a problem or not. Can someone confirm this?

ghc -Wall -fdiagnostics-color=never -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-db _build/stage0/lib/package.conf.d' '-this-unit-id ghc-bignum-1.0' '-package-id ghc-prim-0.6.1' -i -i/ghc/_build/stage0/libraries/ghc-bignum/build -i/ghc/_build/stage0/libraries/ghc-bignum/build/autogen -i/ghc/libraries/ghc-bignum/src/ -I_build/stage0/lib -I_build/stage0/libraries/ghc-bignum/build -I_build/stage0/libraries/ghc-bignum/build/include/ -I_build/stage0/libraries/ghc-bignum/build/include -Ilibraries/ghc-bignum/include/ -Ilibraries/ghc-bignum/include -I/usr/lib64/ghc-8.10.1/include -I_build/stage0/lib -optc-I_build/stage0/lib -optP-include -optP_build/stage0/libraries/ghc-bignum/build/autogen/cabal_macros.h -optP-DBIGNUM_GMP -outputdir _build/stage0/libraries/ghc-bignum/build -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c libraries/ghc-bignum/src/GHC/Num/BigNat.hs -o _build/stage0/libraries/ghc-bignum/build/GHC/Num/BigNat.o -O0 -H64m -Wall -this-unit-id ghc-bignum -XHaskell2010 -fno-warn-deprecated-flags -fforce-recomp 
/tmp/ghc1307255_0/ghc_3.hc: In function ‘ghczmbignum_GHCziNumziBigNat_bigNatRemWordzh_entry’:

/tmp/ghc1307255_0/ghc_3.hc:5818:15: error:
     warning: division by zero [-Wdiv-by-zero]
     5818 | _c4du = 0x1UL % 0x0UL;
          |               ^
     |
5818 | _c4du = 0x1UL % 0x0UL;
     |               ^
/tmp/ghc1307255_0/ghc_3.hc: In function ‘_s3CA’:

/tmp/ghc1307255_0/ghc_3.hc:14926:15: error:
     warning: division by zero [-Wdiv-by-zero]
      |
14926 | _c4Sa = 0x1UL % 0x0UL;
      |               ^
14926 | _c4Sa = 0x1UL % 0x0UL;
      |               ^

Environment

  • GHC version used: 8.10.1

Optional:

  • Operating System: Fedora 32
  • System Architecture: s390x
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information