summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_run/arith017.hs
blob: 68b39fc9796e7ea1c591489a283e16dbdb81b2c5 (plain)
1
2
3
4
5
6
7
8
9
10
-- !!! test for a bug in integer->{Int,Word}64 conversion in GHC 5.04.x

import Data.Int
import Data.Word

main = do
  print (fromIntegral ((2^30 -1 + 2^30) - (2^30 + 2^30 :: Integer))
                :: Data.Int.Int64)
  print (fromIntegral ((2^30 -1 + 2^30) - (2^30 + 2^30 :: Integer))
                :: Data.Word.Word64)