Skip to content

ghc: panic! (the 'impossible' happened): Missing alternative

When I include the -auto-all option (in addition to -prof) on the entry for Main in my Cabal file, I get the ghc panic message below. Full compile output attached.

[10 of 10] Compiling Main             ( Rdf4hParseMain.hs, dist/build/rdf4h/rdf4h-tmp/Main.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.1 for x86_64-unknown-linux):
	Missing alternative
    main:Main.OutputFormat{d r16LZ}
    (main:Main.Help{d r16M9}, [], lvl_s17ar{v} [lid])
    (main:Main.Debug{d r16M7}, [], lvl_s17as{v} [lid])
    (main:Main.Version{d r16M5}, [], lvl_s17at{v} [lid])

To reproduce the bug, check out a tagged version of the code using:

darcs get -t 'ghc bug report' http://protempore.net/rdf4h

And then edit the cabal file by adding "-prof -auto-all" to the library and main entries, and you should see what I see above if it's reproducible. It compiles fine if the options are only added to the library block, and it compiles fine if '-prof' but not '-auto-all' is added to the executable block, but fails when '-prof' and '-auto-all' are both added to the executable block.

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information