regression in GHC 9.0.1: panic converting to STG
From https://github.com/haskellari/strict-containers/runs/2338209240?check_suite_focus=true
[13 of 29] Compiling Data.Strict.HashMap.Autogen.Internal.Strict ( src/Data/Strict/HashMap/Autogen/Internal/Strict.hs, /__w/strict-containers/strict-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/strict-containers-0.1/build/Data/Strict/HashMap/Autogen/Internal/Strict.o, /__w/strict-containers/strict-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/strict-containers-0.1/build/Data/Strict/HashMap/Autogen/Internal/Strict.dyn_o )
ghc: panic! (the 'impossible' happened)
(GHC version 9.0.1:
CoreToStg.myCollectArgs
(\ (@v2_aW5m) (@k_aW5k) -> case undefinedElem of { })
@v2_aW5m @k_aW5k
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Outputable.hs:1230:37 in ghc:GHC.Utils.Outputable
pprPanic, called at compiler/GHC/CoreToStg.hs:938:33 in ghc:GHC.CoreToStg
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
The crash is not transient, it recurs when I re-run the job.
The commit causing the crash only adds a bunch of strictness annotations, though it is operating on a primitive array.
This may or may not be related to #12161, but the code causing the crash here is fairly normal user code.