unariseExpr strange multi val alts panic in GHC 9.2.5
$ cabal unpack vector-0.12.3.0 && cd vector-0.12.3.0 && cabal build -w ghc-9.2.5 --constraint 'primitive == 0.7.3.0'
<skipped>
[19 of 21] Compiling Data.Vector.Unboxed.Base [Control.Monad.Primitive changed]
ghc-9.2.5: panic! (the 'impossible' happened)
(GHC version 9.2.5:
unariseExpr: strange multi val alts
[(False, [], False []),
(True,
[],
case >=# [dt_s6iDt dt3_s6iDx] of {
__DEFAULT ->
case >=# [dt3_s6iDx dt_s6iDt] of {
__DEFAULT -> False [];
1# ->
case +# [dt_s6iDt dt1_s6iDu] of sat_s6iDE [Occ=Once1] {
__DEFAULT ->
case <# [dt3_s6iDx sat_s6iDE] of sat_s6iDF [Occ=Once1] {
__DEFAULT -> tagToEnum# [sat_s6iDF];
};
};
};
1# ->
case +# [dt3_s6iDx dt4_s6iDy] of sat_s6iDG [Occ=Once1] {
__DEFAULT ->
case <# [dt_s6iDt sat_s6iDG] of {
__DEFAULT ->
case >=# [dt3_s6iDx dt_s6iDt] of {
__DEFAULT -> False [];
1# ->
case +# [dt_s6iDt dt1_s6iDu] of sat_s6iDJ [Occ=Once1] {
__DEFAULT ->
case <# [dt3_s6iDx sat_s6iDJ] of sat_s6iDK [Occ=Once1] {
__DEFAULT -> tagToEnum# [sat_s6iDK];
};
};
};
1# -> True [];
};
};
})]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Stg/Unarise.hs:497:5 in ghc:GHC.Stg.Unarise
This particular combination of packages is unbuildable with GHC >= 9.4, so unsure if the bug has been fixed in 9.4 or 9.6 series.
Environment
- GHC version used: 9.2.5
- Operating System: macOS Ventura 13.0.1
- System Architecture: aarch64