diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2017-02-02 12:04:43 -0500 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2017-02-02 12:04:43 -0500 |
commit | d8ac64e782b8543e5a525c7bb738620bd09aa398 (patch) | |
tree | fb9dcd87bcb81e7e63d9f59201eed915545433b9 | |
parent | 8dd82ead7ddd65348bcbea4e2bb8defce4253173 (diff) | |
download | haskell-d8ac64e782b8543e5a525c7bb738620bd09aa398.tar.gz |
Add a testcase for #13227
where an expected float-out is not happening.
-rw-r--r-- | testsuite/tests/simplCore/should_run/T13227.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/T13227.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_run/all.T | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_run/T13227.hs b/testsuite/tests/simplCore/should_run/T13227.hs new file mode 100644 index 0000000000..7bf1b840fa --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T13227.hs @@ -0,0 +1,10 @@ +import Debug.Trace + +g x expensive ys = let h = \y -> y + expensive x + in map h ys +{-# NOINLINE g #-} + +foo x = trace "Evaluate me only once!" x + +main = sum (g 1 foo [1,2,3]) `seq` return () + diff --git a/testsuite/tests/simplCore/should_run/T13227.stderr b/testsuite/tests/simplCore/should_run/T13227.stderr new file mode 100644 index 0000000000..9b9ef72cc0 --- /dev/null +++ b/testsuite/tests/simplCore/should_run/T13227.stderr @@ -0,0 +1 @@ +Evaluate me only once! diff --git a/testsuite/tests/simplCore/should_run/all.T b/testsuite/tests/simplCore/should_run/all.T index 68bd12caff..6fe17e17d6 100644 --- a/testsuite/tests/simplCore/should_run/all.T +++ b/testsuite/tests/simplCore/should_run/all.T @@ -73,3 +73,4 @@ test('T12689broken', expect_broken(12689), compile_and_run, ['']) test('T12689a', normal, compile_and_run, ['']) test('T13172', only_ways(['optasm']), compile_and_run, ['-dcore-lint']) +test('T13227', expect_broken(13227), compile_and_run, ['']) |