
#9208: panic - attempt to prod-split strictness call demand C(S(C(C(S(LS))))) -------------------------------------------------+------------------------- Reporter: luite | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: stranal/should_compile/T9208 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by simonpj): No, there's nothing wrong with the test case, but I should have commented on it. There really is a terrible bug in the program: it takes the value `()`, unsafely casts it to a function, and applies it. As it happens the ASSERT in `StgCmmExpr` can see this happening, and complains. (But a slightly more complicated example might conceal the problem.) So something bizarre is going to happen, but that's what the programmer asked for. In general GHC should never crash, no matter how bizarre the program. You could argue for a civilised error messaage. Or you could argue to remove the ASSERT. But I don't want to spend precious cycles thinking about programs that are wrong anyway. The strongest case for doing something is that building stage-2 with `-DDEBUG` is really a good plan for flushing out latent bugs, but this test will make it look as if there is a failure. I'm open to suggestions about how to fix that. Perhaps the best way would be to switch on `CmmLint` as well as `-DDEBUG`, and make sure `CmmLint` detects this particular problem. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9208#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler