GHC HEAD fails to build with flavour `devel2+debug_ghc+debug_info` using 9.4.2 as boot compiler
While the error message mentions something about wasm this is an x86 build on linux.
andi@horzube:~/ghc_infer_bytecode$ hadrian/build -j6 --flavour=devel2+debug_ghc+debug_info -o_debug
...
Command line: /opt/ghc-9.4.2/bin/ghc -Wall -Wcompat -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _debug/stage0/inplace/package.conf.d' '-this-unit-id ghc-9.7' '-package-id array-0.5.4.0' '-package-id base-4.17.0.0' '-package-id binary-0.8.9.1' '-package-id bytestring-0.11.4.0' '-package-id containers-0.6.6' '-package-id deepseq-1.4.8.0' '-package-id directory-1.3.8.0' '-package-id exceptions-0.10.7' '-package-id filepath-1.4.100.0' '-package-id ghc-boot-9.7' '-package-id ghc-heap-9.7' '-package-id ghci-9.7' '-package-id hpc-0.6.2.0' '-package-id process-1.6.16.0' '-package-id stm-2.5.1.0' '-package-id template-haskell-2.20.0.0' '-package-id time-1.12.2' '-package-id transformers-0.6.0.4' '-package-id unix-2.8.0.0' -i -i/home/andi/ghc_infer_bytecode/_debug/stage0/compiler/build -i/home/andi/ghc_infer_bytecode/_debug/stage0/compiler/build/autogen -i/home/andi/ghc_infer_bytecode/compiler -I_debug/stage0/compiler/build -I_debug/stage0/compiler/build/. -Icompiler/. -I/home/andi/ghc_infer_bytecode/libraries/process/include -I/home/andi/ghc_infer_bytecode/_debug/stage0/libraries/process/build/include -I/home/andi/ghc_infer_bytecode/libraries/directory -I/home/andi/ghc_infer_bytecode/_debug/stage0/libraries/directory/build -I/home/andi/ghc_infer_bytecode/libraries/unix/include -I/home/andi/ghc_infer_bytecode/_debug/stage0/libraries/unix/build/include -I/home/andi/ghc_infer_bytecode/libraries/time/lib/include -I/home/andi/ghc_infer_bytecode/_debug/stage0/libraries/time/build/lib/include -I/home/andi/ghc_infer_bytecode/libraries/containers/containers/include -I/home/andi/ghc_infer_bytecode/_debug/stage0/libraries/containers/containers/build/include -I/home/andi/ghc_infer_bytecode/libraries/bytestring/include -I/home/andi/ghc_infer_bytecode/_debug/stage0/libraries/bytestring/build/include -I/opt/ghc-9.4.2/lib/ghc-9.4.2/lib/x86_64-linux-ghc-9.4.2/base-4.17.0.0/include -I/opt/ghc-9.4.2/lib/ghc-9.4.2/lib/x86_64-linux-ghc-9.4.2/ghc-bignum-1.3/include -I/opt/ghc-9.4.2/lib/ghc-9.4.2/lib/x86_64-linux-ghc-9.4.2/rts-1.0.2/include -optP-include -optP_debug/stage0/compiler/build/autogen/cabal_macros.h -optP-DCAN_LOAD_DLL -outputdir _debug/stage0/compiler/build -fdiagnostics-color=always -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c compiler/GHC/CmmToAsm/Wasm/FromCmm.hs -o _debug/stage0/compiler/build/GHC/CmmToAsm/Wasm/FromCmm.o -O -H64m -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -XBangPatterns -XScopedTypeVariables -XMonoLocalBinds -XTypeOperators -O2 -haddock -fno-warn-deprecated-flags
===> Command failed with error code: 1
ghc-9.4.2: panic! (the 'impossible' happened)
GHC version 9.4.2:
Template variable unbound in rewrite rule
Variable: sg_shHm :: WasmTypeTag 'I32 ~R# WasmTypeTag w_sh0o
Rule "SC:$j0"
Rule bndrs: [sg_shHm]
LHS args: [ty_word_X15]
Actual args: [ty_word_X15]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:182:37 in ghc:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Core/Rules.hs:619:10 in ghc:GHC.Core.Rules
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug