T12176 and others: ASSERT failed on PowerPC 64-bit
Summary
T12176
fails with:
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.9.20190330 for powerpc64-unknown-linux):
ASSERT failed!
in_scope InScope {k_aYp a_aYs}
tenv [aWU :-> (a_aYs[sk:2] |> {co_aYt})]
tenvFVs {k_aYp[tau:1], a_aYs[sk:2], co_aYt}
cenv []
cenvFVs {}
tys [Proxy a_aWU[sk:1] -> X]
cos []
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1169:37 in ghc:Outputable
pprPanic, called at compiler/utils/Outputable.hs:1230:5 in ghc:Outputable
assertPprPanic, called at compiler/types/TyCoRep.hs:3199:56 in ghc:TyCoRep
checkValidSubst, called at compiler/types/TyCoRep.hs:3230:29 in ghc:TyCoRep
substTy, called at compiler/typecheck/TcCanonical.hs:1018:53 in ghc:TcCanonical
Testcases T13910
, break006
, InstantiatedNamedWildcardsInConstraints
, NamedExtraConstraintsWildcard
, T15453
, T14350
, T14605
, and T14904a
fail with the same ASSERT.
The testcases pass on powerpc64le Linux.
Note: I am using a GHC with patched the workaround from #15411 (closed).
The issue might be related to #15411 (closed).
Environment
- GHC version used: 8.9.20190330
Optional:
- Operating System: Linux
- System Architecture: powerpc64 (big-endian)