summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_run/arith017.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/numeric/should_run/arith017.hs')
-rw-r--r--testsuite/tests/numeric/should_run/arith017.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_run/arith017.hs b/testsuite/tests/numeric/should_run/arith017.hs
new file mode 100644
index 0000000000..86048dcbe3
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/arith017.hs
@@ -0,0 +1,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)