#7499: Case-inspecting unboxed unit causes codegen crash -------------------------------+-------------------------------------------- Reporter: rl | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Compile-time crash | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Here is a minimal test case:
{{{ foo :: (() -> (# #)) -> Int foo f = case f () of (# #) -> 5 }}} GHC crashes with: {{{ ghc.exe: panic! (the 'impossible' happened) (GHC version 7.6.1 for i386-unknown-mingw32): compiler\codeGen\CgCase.lhs:572:15-61: Irrefutable pattern failed for pattern ((CoreSyn.DEFAULT, deflt_absC) : others) }}} Here is the actual function (simplified) that triggered the bug: {{{ foo :: [a] -> Int foo xs = foldl' (flip seq) () xs `seq` 5 }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7499> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs