Ticket #1916 (closed merge: fixed)
compiling truncate :: Float -> Int with -O2 panics ghc
| Reported by: | conal | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.8.2 |
| Component: | Compiler | Version: | 6.8.1 |
| Keywords: | Cc: | conal@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Easy (less than 1 hour) | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

