[commit: testsuite] master: Test for #8205 (9267561)

git at git.haskell.org git at git.haskell.org
Thu Sep 12 12:12:22 CEST 2013


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9267561a6f1292e829008b52aeb4aecec98dc057/testsuite

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

commit 9267561a6f1292e829008b52aeb4aecec98dc057
Author: Jan Stolarek <jan.stolarek at p.lodz.pl>
Date:   Thu Sep 12 11:11:13 2013 +0100

    Test for #8205
    
    This test is a bit speculative, because I can't reproduce problem
    on my machine. Still, it should work because it produces the same
    Cmm that originally caused the problem.


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

9267561a6f1292e829008b52aeb4aecec98dc057
 tests/codeGen/should_compile/T8205.hs |   10 ++++++++++
 tests/codeGen/should_compile/all.T    |    1 +
 2 files changed, 11 insertions(+)

diff --git a/tests/codeGen/should_compile/T8205.hs b/tests/codeGen/should_compile/T8205.hs
new file mode 100644
index 0000000..cb480de
--- /dev/null
+++ b/tests/codeGen/should_compile/T8205.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE MagicHash #-}
+module T8205 where
+
+import GHC.Exts
+
+data Stack a = Stack a (Stack a)
+
+dropFromStack :: Int# -> Stack a -> Stack a
+dropFromStack 0# l = l
+dropFromStack n  (x `Stack` xs) = dropFromStack (n -# 1#) xs
diff --git a/tests/codeGen/should_compile/all.T b/tests/codeGen/should_compile/all.T
index 393b2d1..679bc94 100644
--- a/tests/codeGen/should_compile/all.T
+++ b/tests/codeGen/should_compile/all.T
@@ -21,3 +21,4 @@ test('massive_array',
      compile, ['-fPIC'])
 test('T7237', normal, compile, [''])
 test('T7574', [cmm_src, expect_broken(7574), omit_ways(['llvm', 'optllvm'])], compile, [''])
+test('T8205', normal, compile, ['-O0'])




More information about the ghc-commits mailing list