[commit: testsuite] master: Ensure nested CPR does not break havoc with repeat (c3646db)

git at git.haskell.org git at git.haskell.org
Thu Nov 28 09:47:11 UTC 2013


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

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

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

commit c3646db35e13abfde288f236a576efb20074f17b
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Nov 28 09:46:24 2013 +0000

    Ensure nested CPR does not break havoc with repeat
    
    ...not that we do have nested CPR right now, but when we do, this should
    better not break.


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

c3646db35e13abfde288f236a576efb20074f17b
 tests/cpranal/should_run/CPRRepeat.hs                           |    4 ++++
 .../T3207.stdout => cpranal/should_run/CPRRepeat.stdout}        |    0
 .../{annotations/should_compile => cpranal/should_run}/Makefile |    0
 tests/cpranal/should_run/all.T                                  |    7 +++++++
 4 files changed, 11 insertions(+)

diff --git a/tests/cpranal/should_run/CPRRepeat.hs b/tests/cpranal/should_run/CPRRepeat.hs
new file mode 100644
index 0000000..3c2e83b
--- /dev/null
+++ b/tests/cpranal/should_run/CPRRepeat.hs
@@ -0,0 +1,4 @@
+repeat' :: x -> [x]
+repeat' x = x : repeat' x
+
+main = print (repeat' () !! 10 )
diff --git a/tests/codeGen/should_run/T3207.stdout b/tests/cpranal/should_run/CPRRepeat.stdout
similarity index 100%
copy from tests/codeGen/should_run/T3207.stdout
copy to tests/cpranal/should_run/CPRRepeat.stdout
diff --git a/tests/annotations/should_compile/Makefile b/tests/cpranal/should_run/Makefile
similarity index 100%
copy from tests/annotations/should_compile/Makefile
copy to tests/cpranal/should_run/Makefile
diff --git a/tests/cpranal/should_run/all.T b/tests/cpranal/should_run/all.T
new file mode 100644
index 0000000..bcbd34e
--- /dev/null
+++ b/tests/cpranal/should_run/all.T
@@ -0,0 +1,7 @@
+# Just do the opt way...
+def f( name, opts ):
+  opts.only_ways = ['optasm']
+
+setTestOpts(f)
+
+test('CPRRepeat', normal, compile_and_run, [''])



More information about the ghc-commits mailing list