Opened 11 years ago

Closed 11 years ago

#884 closed bug (fixed)

panic "initC: srt" strikes again

Reported by: ekarttun Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.5
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Trying to build jhc fails with the RC-version of GHC 6.6 (20060831). Note the patch to plain jhc to get the API differences into jhc.

-dcore-info seems to catch the error:

Here is how to reproduce: (This needs DrIFT and Happy installed)

darcs get --partial
cd jhc
darcs get
darcs get
darcs apply jhc-ghc6.5.patch

# lots of boring information, and then:

[122 of 156] Compiling DataConstructors ( DataConstructors.hs, DataConstructors.o )

    Warning: Pattern match(es) are non-exhaustive
             In the definition of `tipe'': Patterns not matched: TMetaVar _

    Warning: Pattern match(es) are non-exhaustive
             In a case alternative: Patterns not matched: Nothing
ghc-6.5.20060831: panic! (the 'impossible' happened)
  (GHC version 6.5.20060831 for i386-unknown-linux):
        initC: srt

Please report this as a GHC bug:

make: *** [jhc] Error 1

# Some system information:

ekarttun@melkki:/tmp/ekarttun/jhc $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.5.20060831
ekarttun@melkki:/tmp/ekarttun/jhc $ uname -a
Linux melkki 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 i686 i386 GNU/Linux

Change History (3)

comment:1 Changed 11 years ago by simonpj

Could you try doing this with -dcore-lint, please?

Thanks. Simon

comment:2 Changed 11 years ago by ekarttun

Here is -dcore-lint.

This is from ghc-6.5-20050902 and another i386-linux host.

comment:3 Changed 11 years ago by simonpj

Resolution: fixed
Status: newclosed

Good bug. Now fixed.

GHC 6.5 does enhanced dependency analysis for recursive bindings, to maximise polymorphism based on type signatures. (See Mark Jones's THIH paper.)

I didn't do the bindInstsOfLocalFuns part correctly though, and jhc showed up the bug. (It only matters when you have a recursive group of two or more functions with a type signature, not at top level, which is why it hasn't shown up till now.)

Test is tc207.hs


Note: See TracTickets for help on using tickets.