[commit: packages/base] master: Test case for #8374 (d455e2d)

git at git.haskell.org git at git.haskell.org
Fri Feb 14 10:17:05 UTC 2014


Repository : ssh://git@git.haskell.org/base

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d455e2dfb6d1a7b4b22784f0c49178bd346e15e0/base

>---------------------------------------------------------------

commit d455e2dfb6d1a7b4b22784f0c49178bd346e15e0
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Feb 14 10:17:52 2014 +0000

    Test case for #8374


>---------------------------------------------------------------

d455e2dfb6d1a7b4b22784f0c49178bd346e15e0
 tests/T8374.hs     |    4 ++++
 tests/T8374.stdout |    1 +
 tests/all.T        |    9 +++++++++
 3 files changed, 14 insertions(+)

diff --git a/tests/T8374.hs b/tests/T8374.hs
new file mode 100644
index 0000000..48f2b23
--- /dev/null
+++ b/tests/T8374.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO()
+main = print $ length [1..(2^(20::Int)::Integer)]
diff --git a/tests/T8374.stdout b/tests/T8374.stdout
new file mode 100644
index 0000000..6820bf1
--- /dev/null
+++ b/tests/T8374.stdout
@@ -0,0 +1 @@
+1048576
diff --git a/tests/all.T b/tests/all.T
index f722538..0d62dfd 100644
--- a/tests/all.T
+++ b/tests/all.T
@@ -154,3 +154,12 @@ test('topHandler03',
       exit_code(143)  # actually signal 15 SIGTERM
      ], compile_and_run, [''])
 
+
+test('T8374',
+        [ stats_num_field('bytes allocated', (16828144, 5)),
+	# with GHC-7.6.3: 83937384 (but faster execution than the next line)
+	# before:         58771216 (without call-arity-analysis)
+	# expected value: 16828144 (2014-01-14)
+	only_ways(['normal'])],
+      compile_and_run,
+      ['-O'])



More information about the ghc-commits mailing list