[GHC] #14777: panic when using a function defined in terms of `error`
GHC
ghc-devs at haskell.org
Mon Mar 12 09:28:14 UTC 2018
#14777: panic when using a function defined in terms of `error`
-------------------------------------+-------------------------------------
Reporter: zilinc | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
Operating System: Linux | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
Managed to reproduce the panic on 8.2.1; GHC HEAD builds cleanly.
Defining the following function in `Surface.hs`, and using that instead of
any calls to `__impossible` in `Desugar.hs`, also allows me to build
cleanly on 8.2.1:
{{{
__impossibleDef :: a
__impossibleDef = error "impossible"
}}}
The unmodified example also builds cleanly without optimizations.
Which suggests that some optimization pass produces a situation that hits
a bug somewhere, and that the difference between `__impossible` and
`__impossibleDef` is enough to trigger or not trigger it.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14777#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list