#4121: Ghc stage1 panic, ASSERT failure: libraries/base/Control/Applicative.hs
---------------------------------+------------------------------------------
    Reporter:  dterei            |       Owner:                     
        Type:  bug               |      Status:  new                
    Priority:  normal            |   Component:  Compiler           
     Version:  6.12.2            |    Keywords:                     
          Os:  Unknown/Multiple  |    Testcase:                     
Architecture:  Unknown/Multiple  |     Failure:  Building GHC failed
---------------------------------+------------------------------------------
 While comping GHC Head using the devel1 flavour and ghc-6.12.2 as the
 bootstrap compiler, I get the following assertion failure:

 {{{
 "inplace/bin/ghc-stage1"   -H64m -O -fasm    -package-name base-4.3.0.0
 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-
 install/build -ilibraries/base/dist-install/build/autogen -Ilibraries/base
 /dist-install/build -Ilibraries/base/dist-install/build/autogen
 -Ilibraries/base/include   -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include
 -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package
 ghc-prim-0.2.0.0 -package integer-gmp-0.2.0.0 -package rts-1.0  -package-
 name base -XMagicHash -XExistentialQuantification -XRank2Types
 -XScopedTypeVariables -XUnboxedTuples -XForeignFunctionInterface
 -XUnliftedFFITypes -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
 -XFlexibleInstances -XStandaloneDeriving -XPatternGuards -XEmptyDataDecls
 -XNoImplicitPrelude -XCPP -no-user-package-conf -rtsopts -O -dcore-lint
 -fno-warn-deprecated-flags     -odir libraries/base/dist-install/build
 -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-
 install/build -hisuf hi -osuf  o -hcsuf hc -c
 libraries/base/./Control/Applicative.hs -o libraries/base/dist-
 install/build/Control/Applicative.o

 WARNING: file compiler/simplCore/CSE.lhs line 349 a_aup
 WARNING: file compiler/simplCore/CSE.lhs line 349 a_aup
 WARNING: file compiler/stgSyn/CoreToStg.lhs line 220
 Control.Applicative.$fAlternativeSTM
 ghc-stage1: panic! (the 'impossible' happened)
   (GHC version 6.13 for i386-unknown-linux):
         ASSERT failed! file compiler/stgSyn/CoreToStg.lhs line 187
 base:Control.Applicative.$fAlternativeSTM{v rk} [gid[DFunId]]
 let {
   sat_s1oj{v} [lid]
     :: forall a{tv 12} [tv].
        ghc-prim:GHC.Prim.State#{(w) tc 32q}
          ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
        -> (# ghc-prim:GHC.Prim.State#{(w) tc 32q}
                ghc-prim:GHC.Prim.RealWorld{(w) tc 31E},
              a{tv 12} [tv] #)
   [LclId]
   sat_s1oj{v} [lid] =
     \ (@ a{tv 12} [tv])
       (eta_B1{v} [lid]
          :: ghc-prim:GHC.Prim.State#{(w) tc 32q}
               ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}) ->
       ghc-prim:GHC.Prim.retry#{(w) v 93U} [gid[PrimOp]]
         @ a{tv 12} [tv] eta_B1{v} [lid] } in
 base:Control.Applicative.D:Alternative{v rrp} [gid[DataCon]]
   @ <nt>base:GHC.Conc.STM{tc r2r}
   base:Control.Applicative.$fApplicativeSTM{v r2q} [gid[DFunId]]
   (sat_s1oj{v} [lid]
    `cast` (forall a{tv aIy} [tv].
            ghc-prim:GHC.Prim.sym{(w) tc 34v}
              (base:GHC.Conc.NTCo:STM{tc r2m} a{tv aIy} [tv])
            :: (forall a{tv aIy} [tv].
                ghc-prim:GHC.Prim.State#{(w) tc 32q}
                  ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
                -> (# ghc-prim:GHC.Prim.State#{(w) tc 32q}
                        ghc-prim:GHC.Prim.RealWorld{(w) tc 31E},
                      a{tv aIy} [tv] #))
                 ~
               (forall a{tv aIy} [tv]. base:GHC.Conc.STM{tc r2r} a{tv aIy}
 [tv])))
   (base:GHC.Conc.orElse1{v re9} [gid]
    `cast` (forall a{tv aIx} [tv].
            base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv]
            -> base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv]
            -> ghc-prim:GHC.Prim.sym{(w) tc 34v}
                 (base:GHC.Conc.NTCo:STM{tc r2m} a{tv aIx} [tv])
            :: (forall a{tv aIx} [tv].
                base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv]
                -> base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv]
                -> ghc-prim:GHC.Prim.State#{(w) tc 32q}
                     ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
                -> (# ghc-prim:GHC.Prim.State#{(w) tc 32q}
                        ghc-prim:GHC.Prim.RealWorld{(w) tc 31E},
                      a{tv aIx} [tv] #))
                 ~
               (forall a{tv aIx} [tv].
                base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv]
                -> base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv]
                -> base:GHC.Conc.STM{tc r2r} a{tv aIx} [tv])))
   (base:Control.Applicative.$fAlternativeSTM3{v r2n} [gid]
    `cast` (forall a{tv aup} [sk].
            base:GHC.Conc.STM{tc r2r} a{tv aup} [sk]
            -> ghc-prim:GHC.Prim.sym{(w) tc 34v}
                 (base:GHC.Conc.NTCo:STM{tc r2m} [a{tv aup} [sk]])
            :: (forall a{tv aup} [sk].
                base:GHC.Conc.STM{tc r2r} a{tv aup} [sk]
                -> ghc-prim:GHC.Prim.State#{(w) tc 32q}
                     ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
                -> (# ghc-prim:GHC.Prim.State#{(w) tc 32q}
                        ghc-prim:GHC.Prim.RealWorld{(w) tc 31E},
                      [a{tv aup} [sk]] #))
                 ~
               (forall a{tv aup} [sk].
                base:GHC.Conc.STM{tc r2r} a{tv aup} [sk]
                -> base:GHC.Conc.STM{tc r2r} [a{tv aup} [sk]])))
   (base:Control.Applicative.$fAlternativeSTM1{v r2l} [gid]
    `cast` (forall a{tv av2} [sk].
            base:GHC.Conc.STM{tc r2r} a{tv av2} [sk]
            -> ghc-prim:GHC.Prim.sym{(w) tc 34v}
                 (base:GHC.Conc.NTCo:STM{tc r2m} [a{tv av2} [sk]])
            :: (forall a{tv av2} [sk].
                base:GHC.Conc.STM{tc r2r} a{tv av2} [sk]
                -> ghc-prim:GHC.Prim.State#{(w) tc 32q}
                     ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
                -> (# ghc-prim:GHC.Prim.State#{(w) tc 32q}
                        ghc-prim:GHC.Prim.RealWorld{(w) tc 31E},
                      [a{tv av2} [sk]] #))
                 ~
               (forall a{tv av2} [sk].
                base:GHC.Conc.STM{tc r2r} a{tv av2} [sk]
                -> base:GHC.Conc.STM{tc r2r} [a{tv av2} [sk]])))
 base:Control.Applicative.$fAlternativeSTM{v rk} [gid[DFunId]] =
     [] \u srt:SRT:[] []
         let {
           sat_s1oj{v} [lid] =
               [] \r srt:SRT:[] [eta_B1{v} [lid]] retry#{v} [eta_B1{v}
 [lid]];
         } in
           base:Control.Applicative.D:Alternative{d rra}
 [base:Control.Applicative.$fApplicativeSTM{v r2q} [gid[DFunId]]
                                                          sat_s1oj{v} [lid]
 base:GHC.Conc.orElse1{v re9} [gid]
 base:Control.Applicative.$fAlternativeSTM3{v r2n} [gid]
 base:Control.Applicative.$fAlternativeSTM1{v r2l} [gid]];

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

 This is on the 32bit MSRC machine by the way. On my own laptop running
 Ubuntu 10.04 I don't get this (bootstrap compiler is 6.12.1 though).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4121>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to