summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r--testsuite/tests/numeric/should_run/T15301.hs7
-rw-r--r--testsuite/tests/numeric/should_run/T15301.stdout1
-rw-r--r--testsuite/tests/numeric/should_run/all.T1
3 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_run/T15301.hs b/testsuite/tests/numeric/should_run/T15301.hs
new file mode 100644
index 0000000000..6efbce4334
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/T15301.hs
@@ -0,0 +1,7 @@
+import Numeric
+import GHC.Natural
+
+main = do
+ -- test that GHC correctly compiles big Natural literals
+ let x = 0xffffffffffffffffffffffff :: Natural
+ print (showHex x "" == "ffffffffffffffffffffffff")
diff --git a/testsuite/tests/numeric/should_run/T15301.stdout b/testsuite/tests/numeric/should_run/T15301.stdout
new file mode 100644
index 0000000000..0ca95142bb
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/T15301.stdout
@@ -0,0 +1 @@
+True
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index 691fc26f7a..140fa6c50b 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -65,3 +65,4 @@ test('T10011', normal, compile_and_run, [''])
test('T10962', omit_ways(['ghci']), compile_and_run, ['-O2'])
test('T11702', extra_ways(['optasm']), compile_and_run, [''])
test('T12136', normal, compile_and_run, [''])
+test('T15301', normal, compile_and_run, ['-O2'])