Opened 13 years ago

Closed 13 years ago

Last modified 44 years ago

#536 closed bug (Fixed)

Bad Beta Expand and the Impossible

Reported by: lewie Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Bad things happen with the following program, in
combination with -O2 -funfolding-use-threshold30
-funbox-strict-fields

import Parsec

data GMLToken = TBody ()

token :: Parser GMLToken
token = do { return (TBody undefined) }

GHC 5.0 sez:

Bad eta expand
    ParsecError.zdwParseError{-rj0-}
      ww1{-rls-} (PrelBase.zdwZMZN{-6n-} @
ParsecError.Message{-rj8-})
    ParsecError.ParseError{-rgd-}
Bad eta expand
    Parsec.zdwState{-rcs-} ww{-rlt-} ww1{-rls-}
    Parsec.State{-rct-}
Bad eta expand
    Parsec.zdwOk{-rcz-}
      @ Parse.GMLToken{-r2-} w{-rlr-} tpl{-rlq-}
a1{-rlp-}
    Parsec.Reply{-rcB-} Parse.GMLToken{-r2-}
ghc-5.00: panic! (the `impossible' happened, GHC
version 5.00):
	/tmp/ghc8815.lpp:1469: Non-exhaustive patterns in
function cat_evals

Deleting any of the options makes the problem go away.

Change History (1)

comment:1 Changed 13 years ago by simonpj

  • Status changed from assigned to closed
Logged In: YES 
user_id=50165

I've fixed this one; but I can't check the fix in because 
the repository disk is full.

The Parsec library was compiled without -funbox-strict-
fields, but the compiler read the data type decl from 
Parsec.hi and decide to treat it as if it had unboxed 
fields anyway.  
Note: See TracTickets for help on using tickets.