[GHC] #12746: Assertion failed with BuildFlavour = devel2 (one more)

GHC ghc-devs at haskell.org
Fri Oct 21 03:02:06 UTC 2016


#12746: Assertion failed with  BuildFlavour = devel2 (one more)
-------------------------------------+-------------------------------------
           Reporter:  pacak          |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Affected versions: ghc 8.0.1 and ghc git master as of 21 Oct 2016
 (c23dc61)


 It compiles fine on first time but fails to compile on second attempt.
 Using -fforce-recomp recompiles both files and bug is not triggered.



 {{{
 % ls
 A.hs  B.hs

 % cat A.hs
 }}}

 {{{#!hs
 module A where

 import B

 foo a = case a of
         Foo -> True
         _ -> False
 }}}

 {{{
 % cat B.hs
 }}}

 {{{#!hs
 {-# LANGUAGE PatternSynonyms, ScopedTypeVariables #-}

 module B where

 pattern Foo = 0x00000001 :: Int
 }}}

 {{{
 % ghc -O2 A.hs ; touch A.hs ; ghc -O2 A.hs
 [1 of 2] Compiling B                ( B.hs, B.o )
 [2 of 2] Compiling A                ( A.hs, A.o )
 [2 of 2] Compiling A                ( A.hs, A.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         ASSERT failed!
   CallStack (from HasCallStack):
   assertPprPanic, called at compiler/iface/BuildTyCl.hs:195:404 in
 ghc:BuildTyCl
   [] ~ []
   [] ~ []
   Int ~ Int
   [] ~ []
   [] ~ []
   [] ~ [Void#]

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

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


More information about the ghc-tickets mailing list