Data.Typeable.Internal with -fwrite-ide-info causes a panic
I was trying to build GHC with -fwrite-ide-info
but this leads to a hard to understand panic when compiling Data.Typeable.Internal
.
To reproduce, the following goes in hadrian.settings
.
stage1.*.ghc.hs.opts += -fwrite-ide-info
Then this command line fails.
_build/stage0/bin/ghc -Wall -fdiagnostics-color=never -dynamic-too -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id base-4.16.0.0' '-package-id ghc-bignum-1.0' '-package-id ghc-prim-0.8.0' '-package-id rts-1.0' -i -i/home/matt/ghc-ticky/_build/stage1/libraries/base/build -i/home/matt/ghc-ticky/_build/stage1/libraries/base/build/autogen -i/home/matt/ghc-ticky/libraries/base -Iincludes -I_build/stage1/lib -I_build/stage1/libraries/base/build -I/nix/store/7jz3aqg5ls1jpzvra512spih4asidr2i-gmp-6.2.0-dev/include -I_build/stage1/libraries/base/build/include -Ilibraries/base/include -I/nix/store/7jz3aqg5ls1jpzvra512spih4asidr2i-gmp-6.2.0-dev/include -I/home/matt/ghc-ticky/_build/stage1/lib/x86_64-linux-ghc-9.1.20210323/ghc-bignum-1.0/include -I/nix/store/35v0m2ih9q4x3crhxiyr3pxc8ckn73gi-elfutils-0.180/include -I/nix/store/saghih5p46g1nm8vmvxc5vw5pfj1nc79-numactl-2.0.13/include -I/home/matt/ghc-ticky/_build/stage1/lib/x86_64-linux-ghc-9.1.20210323/rts-1.0/include -I_build/stage1/lib -optc-I_build/stage1/lib -optP-include -optP_build/stage1/libraries/base/build/autogen/cabal_macros.h -outputdir _build/stage1/libraries/base/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c libraries/base/Data/Typeable/Internal.hs -o _build/stage1/libraries/base/build/Data/Typeable/Internal.o -O2 -H32m -this-unit-id base -Wcompat -Wnoncanonical-monad-instances -XHaskell2010 -no-global-package-db -package-db=/home/matt/ghc-ticky/_build/stage1/lib/package.conf.d -ghcversion-file=/home/matt/ghc-ticky/_build/stage1/lib/ghcversion.h -haddock -Wno-deprecated-flags -Wno-trustworthy-safe -ticky -ticky-allocd -ticky-dyn-thunk -ddump-to-file -ddump-stg-final -fwrite-ide-info
Removing the final -write-ide-info
leads to the command succeeding.
I suspect this is related to #19334 (closed)