summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/numeric/should_run/arith017.hs
blob: 86048dcbe39652dfa9a0cd7ab2069670ec3bcac0 (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)