Heap overflow in optimizer
Compiling the following with optimisations:
module Test where
import Data.Bits (setBit)
f = foldl setBit 0 [x | (x,_) <- zip [0..] [1]] :: Integer
fails with:
$ ghc -O0 -fforce-recomp Test.hs
[1 of 1] Compiling Test ( Test.hs, Test.o )
$ ghc -O -fforce-recomp Test.hs
[1 of 1] Compiling Test ( Test.hs, Test.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.4.1 for x86_64-unknown-linux):
heap overflow
Fails on 8.0.2, 8.2.2, and 8.4.1
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |