Opened 8 years ago

Closed 8 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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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:
http://www.cs.helsinki.fi/u/ekarttun/haskell/jhc-ghc6.5.dcore-info.txt

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

darcs get --partial http://repetae.net/john/repos/jhc
cd jhc
darcs get http://repetae.net/john/repos/Boolean
darcs get http://repetae.net/john/repos/Doc
wget http://www.cs.helsinki.fi/u/ekarttun/haskell/jhc-ghc6.5.patch
darcs apply jhc-ghc6.5.patch
make

# lots of boring information, and then:

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

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

DataConstructors.hs:419:18:
    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:  http://www.haskell.org/ghc/reportabug

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 8 years ago by simonpj

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

Thanks. Simon

comment:2 Changed 8 years ago by ekarttun

Here is -dcore-lint.

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

http://www.cs.helsinki.fi/u/ekarttun/haskell/jhc-ghc6.5.dcore-lint.txt

comment:3 Changed 8 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

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


Simon

Note: See TracTickets for help on using tickets.