#6156: Optimiser bug on linux-powerpc
------------------------------------------+---------------------------------
  Reporter:  erikd                        |          Owner:  pcapriotti
      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):

 Simplified test case for this bug:

 {{{
 import Data.Bits
 import Data.Word

 w64tow32 :: Word64 -> (Word32, Word32)
 w64tow32 w =
     (fromIntegral (w `shiftR` 32), fromIntegral (w .&. 0xffffffff))

 main :: IO ()
 main =
     if w64tow32 1238988323332265734 == (288474448,3440613126)
         then putStrLn "Pass"
         else putStrLn "Fail"
 }}}

 Compling without optimisation (or with -O0) passes, with -O1 or above it
 fails.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6156#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to