summaryrefslogtreecommitdiff
path: root/testsuite/tests/cpranal
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2013-11-28 09:46:24 +0000
committerJoachim Breitner <mail@joachim-breitner.de>2013-11-28 09:46:24 +0000
commitb5b66131dd6b5bf9f04708fd6ebc9b761d8bda53 (patch)
tree8be10c77098f272f2e47e6f8516e6e0c1e24a521 /testsuite/tests/cpranal
parentd2bcc7966b0dd2dfd48602c28e48d2ed0b76699a (diff)
downloadhaskell-b5b66131dd6b5bf9f04708fd6ebc9b761d8bda53.tar.gz
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.
Diffstat (limited to 'testsuite/tests/cpranal')
-rw-r--r--testsuite/tests/cpranal/should_run/CPRRepeat.hs4
-rw-r--r--testsuite/tests/cpranal/should_run/CPRRepeat.stdout1
-rw-r--r--testsuite/tests/cpranal/should_run/Makefile3
-rw-r--r--testsuite/tests/cpranal/should_run/all.T7
4 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/cpranal/should_run/CPRRepeat.hs b/testsuite/tests/cpranal/should_run/CPRRepeat.hs
new file mode 100644
index 0000000000..3c2e83b787
--- /dev/null
+++ b/testsuite/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/testsuite/tests/cpranal/should_run/CPRRepeat.stdout b/testsuite/tests/cpranal/should_run/CPRRepeat.stdout
new file mode 100644
index 0000000000..6a452c185a
--- /dev/null
+++ b/testsuite/tests/cpranal/should_run/CPRRepeat.stdout
@@ -0,0 +1 @@
+()
diff --git a/testsuite/tests/cpranal/should_run/Makefile b/testsuite/tests/cpranal/should_run/Makefile
new file mode 100644
index 0000000000..9101fbd40a
--- /dev/null
+++ b/testsuite/tests/cpranal/should_run/Makefile
@@ -0,0 +1,3 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/cpranal/should_run/all.T b/testsuite/tests/cpranal/should_run/all.T
new file mode 100644
index 0000000000..bcbd34e70c
--- /dev/null
+++ b/testsuite/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, [''])