[GHC] #6156: Optimiser bug on linux-powerpc
GHC
cvs-ghc at haskell.org
Tue Aug 14 13:47:13 CEST 2012
#6156: Optimiser bug on linux-powerpc
------------------------------------------+---------------------------------
Reporter: erikd | Owner: igloo
Type: bug | Status: new
Priority: normal | Milestone: 7.6.1
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Os: Linux | Architecture: powerpc
Failure: Incorrect result at runtime | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
------------------------------------------+---------------------------------
Comment(by erikd):
Pulling `succ` out of the `Enum` typeclass into a standalone program we
get:
{{{
import GHC.Word
import Numeric
main :: IO ()
main = putStrLn (showHex (succWord64 (0xa1a2a3a3ffffffff :: Word64)) "")
succWord64 :: Word64 -> Word64
succWord64 x =
if x /= (0xffffffffffffffff::Word64)
then x + 1
else error "succWord64"
}}}
It still works correctly without optimisation and fails with it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6156#comment:33>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list