Literal out of Word# range in ghc-stage1 64 bit cross compiler
Summary
ghc-8.8.1 ghc-stage1 x86_64 compiler (built by ghc-8.6.3 i386) produces errors compiling .hs files:
"inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -H32m -O -Wall -fPIC -this-unit-id ghc-prim-0.5.3 -hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-install/build -ilibraries/ghc-prim/dist-install/build/./autogen -Ilibraries/ghc-prim/dist-install/build/./autogen -Ilibraries/ghc-prim/. -optP-include -optPlibraries/ghc-prim/dist-install/build/./autogen/cabal_macros.h -package-id rts -this-unit-id ghc-prim -XHaskell2010 -O2 -haddock -no-user-package-db -rtsopts -Wno-trustworthy-safe -Wno-deprecated-flags -Wnoncanonical-monad-instances -outputdir libraries/ghc-prim/dist-install/build -split-sections -c libraries/ghc-prim/./GHC/Types.hs -o libraries/ghc-prim/dist-install/build/GHC/Types.o
GHC.Types:1:1: warning: [-Woverflowed-literals]
Literal 15682245359589723674 is out of the Word# range 0..4294967295
GHC.Types:1:1: warning: [-Woverflowed-literals]
Literal 477356598552519110 is out of the Word# range 0..4294967295
(... etc.)
(ghc-8.6.3 cross compiler built the same way does not have this problem. I wish I could be of some help tracking this to its source, but am quite baffled. Happens with almost all .hs files, with the exception of the most trivial file with no "data" declaration, but once the file is sufficiently substantial to trigger this problem, I believe the same Literals are reported regardless of what Haskell source code appears in the file.)
Steps to reproduce
Build 8.8.1 as a cross compiler for x86_64. For all I know it may suffice to build 8.8.1 native x86_64, depending on the cause of the problem, but I can't go there yet.
Expected behavior
Millions of warnings, eventually fails on Distribution.Parsec.FieldLineStream
Environment
- GHC version used: 8.8.1 (built by 8.6.3)
Optional:
- Operating System: Haiku
- System Architecture: i386