#7323: decoding GADTs gives internal error: stg_ap_v_ret
---------------------------+------------------------------------------------
Reporter: heisenbug | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Keywords:
Os: Linux | Architecture: x86_64 (amd64)
Failure: Runtime crash | Testcase: yes
Blockedby: | Blocking:
Related: |
---------------------------+------------------------------------------------
May be related to #4987, but this time I have a reproducible case.
So far I found out that the `%INFO_TYPE(%STD_INFO(info))`
in `stg_ap_v` is 4 (==`CONSTR_2_0`) just before barfing.
The unsafe cast is just to generalize to the return type,
but seem to be crucial. When I make `TypedPair` unparametrized
or remove the TPInt constructor (but remaining a GADT), the crash goes
away.
The problem does not happen with GHCi (with this testcase), but I have
seen the same crash in GHCi too with a more involved code example.
I compiled vanilla: `ghc internal-error.lhs; ./internal-error`
I did not test with older compilers.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7323>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs