Re: [GHC] #2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669

2009-01-16 Thread GHC
#2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669
--+-
Reporter:  batterseapower |Owner:  igloo  
Type:  bug|   Status:  closed 
Priority:  normal |Milestone:  6.10.2 
   Component:  Compiler   |  Version:  6.9
Severity:  normal |   Resolution:  fixed  
Keywords: |   Difficulty:  Unknown
Testcase:  simplCore/should_compile/simpl014  |   Os:  MacOS X
Architecture:  Unknown/Multiple   |  
--+-
Changes (by igloo):

  * status:  new = closed
  * resolution:  = fixed

Comment:

 Confirmed: `simpl014` now passes with `./validate --slow`.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2368#comment:5
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


Re: [GHC] #2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669

2009-01-13 Thread GHC
#2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669
--+-
Reporter:  batterseapower |Owner:  igloo  
Type:  bug|   Status:  new
Priority:  normal |Milestone:  6.10.2 
   Component:  Compiler   |  Version:  6.9
Severity:  normal |   Resolution: 
Keywords: |   Difficulty:  Unknown
Testcase:  simplCore/should_compile/simpl014  |   Os:  MacOS X
Architecture:  Unknown/Multiple   |  
--+-
Changes (by simonpj):

  * owner:  = igloo

Comment:

 I believe this is fixed by
 {{{
 Tue Jan 13 16:49:53 GMT 2009  simo...@microsoft.com
   * Rewrite CorePrep and improve eta expansion
 }}}
 Do not merge to the 6.10 branch (at least not yet); it's a bit radical.

 Ian: can you check you agree this is now ok, and close.

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2368#comment:4
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


Re: [GHC] #2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669

2008-10-04 Thread GHC
#2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669
---+
 Reporter:  batterseapower |  Owner:
  
 Type:  bug| Status:  new   
  
 Priority:  normal |  Milestone:  6.10.2
  
Component:  Compiler   |Version:  6.9   
  
 Severity:  normal | Resolution:
  
 Keywords: | Difficulty:  Unknown   
  
 Testcase:  simplCore/should_compile/simpl014  |   Architecture:  
Unknown/Multiple
   Os:  MacOS X|  
---+
Changes (by igloo):

  * milestone:  6.10.1 = 6.10.2

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2368#comment:3
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


Re: [GHC] #2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669

2008-07-01 Thread GHC
#2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669
---+
 Reporter:  batterseapower |  Owner: 
 Type:  bug| Status:  new
 Priority:  normal |  Milestone:  6.10.1 
Component:  Compiler   |Version:  6.9
 Severity:  normal | Resolution: 
 Keywords: | Difficulty:  Unknown
 Testcase:  simplCore/should_compile/simpl014  |   Architecture:  Unknown
   Os:  MacOS X|  
---+
Changes (by igloo):

  * difficulty:  = Unknown
  * milestone:  = 6.10.1

Comment:

 This is reproducible with `./validate --slow`.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2368#comment:1
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


[GHC] #2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669

2008-06-17 Thread GHC
#2368: ASSERT failed! file coreSyn/CorePrep.lhs line 669
---+
Reporter:  batterseapower  |   Owner:   
Type:  bug |  Status:  new  
Priority:  normal  |   Component:  Compiler 
 Version:  6.9 |Severity:  normal   
Keywords:  |Testcase:  simplCore/should_compile/simpl014
Architecture:  Unknown |  Os:  MacOS X  
---+
 This is exposed by running the testsuite on a stage2 compiler with
 -DDEBUG. The tests triggering it are:
  * simplCore/should_compile/simpl014

 The affected context is:

 {{{
 etaExpandRhs :: CoreBndr - CoreExpr - UniqSM CoreExpr
 etaExpandRhs bndr rhs = do
 -- Eta expand to match the arity claimed by the binder
 -- Remember, CorePrep must not change arity
 --
 -- Eta expansion might not have happened already,
 -- because it is done by the simplifier only when
 -- there at least one lambda already.
 --
 -- NB1:we could refrain when the RHS is trivial (which can happen
 -- for exported things).  This would reduce the amount of code
 -- generated (a little) and make things a little words for
 -- code compiled without -O.  The case in point is data
 constructor
 -- wrappers.
 --
 -- NB2: we have to be careful that the result of etaExpand doesn't
 --invalidate any of the assumptions that CorePrep is
 attempting
 --to establish.  One possible cause is eta expanding inside of
 --an SCC note - we're now careful in etaExpand to make sure
 the
 --SCC is pushed inside any new lambdas that are generated.
 --
 -- NB3: It's important to do eta expansion, and *then* ANF-ising
 --  f = /\a - g (h 3)  -- h has arity 2
 -- If we ANF first we get
 --  f = /\a - let s = h 3 in g s
 -- and now eta expansion gives
 --  f = /\a - \ y - (let s = h 3 in g s) y
 -- which is horrible.
 -- Eta expanding first gives
 --  f = /\a - \y - let s = h 3 in g s y
 --
 us - getUniquesM
 let eta_rhs = etaExpand arity us rhs (idType bndr)

 ASSERT2( manifestArity eta_rhs == arity, (ppr bndr + ppr arity +
 ppr (exprArity rhs))
   $$ ppr rhs $$ ppr eta_rhs )
 -- Assertion checks that eta expansion was successful
   return eta_rhs
   where
 -- For a GlobalId, take the Arity from the Id.
 -- It was set in CoreTidy and must not change
 -- For all others, just expand at will
 arity | isGlobalId bndr = idArity bndr
   | otherwise   = exprArity rhs
 }}}

 The precise error is:
 {{{
 ghc-6.9.20080614: panic! (the 'impossible' happened)
   (GHC version 6.9.20080614 for i386-apple-darwin):
 ASSERT failed! file coreSyn/CorePrep.lhs line 669
 main:ShouldCompile.runHandler{v r6G} [gid] 3 3
 __inline_me ((\ (@ st{tv a73} [tv] :: ghc-prim:GHC.Prim.*{(w) tc 34d})
 (w{v si9} [lid] :: main:ShouldCompile.M{tc r7}
  (main:ShouldCompile.IHR{tc r6} st{tv
 a73} [tv]))
 (w1{v sia} [lid] :: main:ShouldCompile.IHandler{tc r8}
   st{tv a73} [tv])
 (eta{v sj4} [lid] :: ghc-prim:GHC.Prim.State#{(w) tc 32q}
ghc-prim:GHC.Prim.RealWorld{(w) tc
 31E})
 (eta1{v sjb} [lid] :: ghc-prim:GHC.Prim.State#{(w) tc 32q}
 ghc-prim:GHC.Prim.RealWorld{(w) tc
 31E}) -
 main:ShouldCompile.$wrunHandler{v r2} [gid]
   @ st{tv a73} [tv] w1{v sia} [lid] eta1{v sjb} [lid])
  `cast` (ghc-prim:GHC.Prim.trans{(w) tc 34y}
(forall st{tv a73} [tv].
 main:ShouldCompile.M{tc r7}
   (main:ShouldCompile.IHR{tc r6} st{tv a73} [tv])
 - main:ShouldCompile.IHandler{tc r8} st{tv a73}
 [tv]
 - ghc-prim:GHC.Prim.State#{(w) tc 32q}
  ghc-prim:GHC.Prim.RealWorld{(w) tc 31E}
 - ghc-prim:GHC.Prim.CoUnsafe{(w) tc 34K}
  (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},
 base:GHC.Base.(){(w) tc 40} #))