compiling truncate :: Float -> Int with -O2 panics ghc
bash-3.2$ cat Bug.hs
{-# OPTIONS -fglasgow-exts -O2 #-}
module Bug (tst) where
tst :: Float -> Bool
tst x = truncate x > (0::Int)
bash-3.2$ ghc Bug.hs
ghc.exe: panic! (the 'impossible' happened)
(GHC version 6.8.1.20071102 for i386-unknown-mingw32):
narrowTo
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Same results reported on linux.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | conal@conal.net |
| Operating system | Unknown |
| Architecture | Unknown |