[GHC] #11172: Turning on optimisations produces SEGFAULT or Impossible case alternative

GHC ghc-devs at haskell.org
Mon Jan 18 22:41:53 UTC 2016


#11172: Turning on optimisations produces SEGFAULT or Impossible case alternative
-------------------------------------+-------------------------------------
        Reporter:  nh2               |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 The issue here is clearly,
 {{{#!hs
 Main.main5
   :: (Either () GHC.Prim.Any, Module.JSONState Mytype)
      -> Either String (Either () Float, Module.JSONState ())
 Main.main5 =
   \ (a31_XcHt
        :: (Either () GHC.Prim.Any, Module.JSONState Mytype)) ->
     case a31_XcHt of _ [Occ=Dead] { (a26_XdKv, s'_XdKx) ->
     case a26_XdKv of _ [Occ=Dead] {
       Left e1_adOn ->
         case s'_XdKx
         of _ [Occ=Dead] { Module.JSONState ds1_XcmP ns'_XagP ds2_XcmS ->
         Data.Either.Right
           @ String
           @ (Either () Float, Module.JSONState ())
           (Data.Either.Left @ () @ Float e1_adOn,
            Module.JSONState
              @ () (GHC.Types.[] @ String) ns'_XagP GHC.Tuple.())
         };
       Right x_XdQJ -> case Main.main6 of wild2_00 { }   -- uh oh
     }
     }
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11172#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list