compiling singletons-1.1.2.1 as -O1 -fspec-constr fails as 'Template variable unbound in rewrite rule'
First observed on singletons-1.1.2.1 package ghc-7.10.2.
I've tried to distill it down to a single file.
The file manages to crash both GHC and GHCi.
GHCi:
$ inplace/bin/ghc-stage2 -hide-all-packages -package=base --interactive List.hs
GHCi, version 7.11.20150723: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling List ( List.hs, interpreted )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.11.20150723 for x86_64-unknown-linux):
floatExpr tick break<2>()
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
GHC:
$ inplace/bin/ghc-stage2 -hide-all-packages -package=base --make List.hs -dsuppress-all -dsuppress-uniques
[1 of 1] Compiling List ( List.hs, List.o )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.11.20150723 for x86_64-unknown-linux):
Template variable unbound in rewrite rule
m
[a_afdP, x, m, ipv, ipv, sc, sc, sc, sg]
[a_afdP, x, m, ipv, ipv, sc, sc, sc, sg]
[TYPE a_afdP, TYPE x, TYPE Let1627448493XsSym4 x m ipv ipv, sc,
(SCons @~ ... sc sc) `cast` ...]
[TYPE a_afdP, TYPE x, TYPE Let1627448493XsSym4 x ipv ipv ipv, sc,
(SCons @~ ... ipv ipv) `cast` ...]
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
The "minimal" single-file sample is attached.
If you need original selfcontained reproducer (79 modules, template haskell code) this is the version i've started with: http://code.haskell.org/~slyfox/unbound-template-var.tar.gz Adjusting path to GHC in ./trigger-a-bug.bash should be enough.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.2-rc2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | goldfire, simonpj |
| Operating system | |
| Architecture |