[GHC] #10870: PPC.Ppr: Shift by 32 bits is not allowed.
GHC
ghc-devs at haskell.org
Sun Sep 13 07:10:23 UTC 2015
#10870: PPC.Ppr: Shift by 32 bits is not allowed.
---------------------------------------+----------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (CodeGen) | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: powerpc
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
---------------------------------------+----------------------------------
Comment (by erikd):
I'm currently working on the ghc-7.10 branch because the master branch
currently does not compile on PowerPC due to #7830.
I have a test program:
{{{
import Data.Bits
import Data.Int
import Data.Word
shift32R :: (Bits a, Num a) => a -> a
shift32R x = unsafeShiftR x 32
main :: IO ()
main = do
print $ map shift32R [ 123456, 0x7fffffff :: Int ]
print $ map shift32R [ 123456, 0xffffffff :: Word ]
print $ map shift32R [ 123456678, 123456678123456678 :: Int64 ]
print $ map shift32R [ 123456678, 123456678123456678 :: Word64 ]
}}}
and I have a fix that seems to work (PowerPC output is same as for x86_64
and Arm), but the compiler prints 14 identical instances of the warning:
{{{
WARNING: file compiler/simplCore/SimplEnv.hs, line 530 showl_a1O5
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10870#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list