diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-04-01 11:37:53 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-05 20:44:02 -0400 |
commit | 836542409f8dcb6ec23bda485d01880d24bd3d93 (patch) | |
tree | 7a09376e8589b597894b4502934501ecb24630e8 | |
parent | 048af266ff63f08d4ff2cb4345b7805162442f29 (diff) | |
download | haskell-836542409f8dcb6ec23bda485d01880d24bd3d93.tar.gz |
Add (expect_broken) test for #11545
-rw-r--r-- | testsuite/tests/perf/compiler/T11545.hs | 12 | ||||
-rw-r--r-- | testsuite/tests/perf/compiler/all.T | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/T11545.hs b/testsuite/tests/perf/compiler/T11545.hs new file mode 100644 index 0000000000..d35e21c2e8 --- /dev/null +++ b/testsuite/tests/perf/compiler/T11545.hs @@ -0,0 +1,12 @@ +module T11545 where + +data A = A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A deriving (Eq) + +data QuadTree a = QuadTree !Int [a] (QuadTree a) (QuadTree a) (QuadTree a) (QuadTree a) + +foldQuadTree :: (a -> b -> b) -> Int -> b -> QuadTree a -> b +foldQuadTree f maxSize = go + where + go z (QuadTree size elems t1 t2 t3 t4) + | size <= maxSize = foldr f z elems + | otherwise = go (go (go (go z t4) t3) t2) t1 diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index 937858c2a7..b09c418698 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -452,3 +452,7 @@ test ('T9198', [ collect_compiler_stats('bytes allocated',2) ], compile, ['']) + +test('T11545', + [ expect_broken(11545) ], + compile, ['-O +RTS -M50M -RTS']) |