[GHC] #8847: Int64 ^ Int64 broken by optimization on SPARC

#8847: Int64 ^ Int64 broken by optimization on SPARC --------------------------+------------------------------------------------ Reporter: | Owner: kgardas | Status: new Type: bug | Milestone: Priority: normal | Version: Component: | Operating System: Solaris Compiler (NCG) | Type of failure: Incorrect result at runtime Keywords: | Test Case: Architecture: sparc | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | --------------------------+------------------------------------------------ The T7507 test is broken on SPARC NCG, I've more simplified it to {{{ module Main where import Data.Int main = print ( ( 2 :: Int64 ) ^ ( 6 :: Int64 ) ) }}} it does not matter if it's run with two Int64 or just with one: {{{ main = print ( 2 ^ 6 :: Int64 ) }}} the result with -O is still 0. The result without -O is correct. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8847 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8847: Int64 ^ Int64 broken by optimization on SPARC ------------------------------------------------+-------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (NCG) | Version: Resolution: | Keywords: Operating System: Solaris | Architecture: sparc Type of failure: Incorrect result at runtime | Difficulty: Test Case: | Unknown Blocking: 8816 | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by kgardas): {{{ main = print ( 2 ^ 5 :: Int64 ) }}} runs fine and returns correct result. The problem is with optimization of {{{2 ^ X, X > 5}}}. Also I've though the problem may be with a call to ghc-prim hs_timesInt64, but this call is also presented and used in {{{2 ^ 5}}} optimized version, so this does not seems like a culprit. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8847#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC