diff options
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T7944.hs | 19 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 17 |
2 files changed, 28 insertions, 8 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T7944.hs b/testsuite/tests/simplCore/should_compile/T7944.hs new file mode 100644 index 0000000000..bb62427e0a --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T7944.hs @@ -0,0 +1,19 @@ +module T7944 where + +import GHC.Exts + +-- Force specialisation of "go" +data SPEC = SPEC | SPEC2 +{-# ANN type SPEC ForceSpecConstr #-} + +-- This is more or less just an ordinary fold +go :: SPEC -> [a] -> IntMap a -> IntMap a +go SPEC [] m = m +go SPEC (_:xs) m + = go SPEC xs + -- This would be the "worker function" of the fold + $ Unary m + + +-- Both constructors are necessary, despite only one being used +data IntMap a = Nil | Unary (IntMap a) diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 2d87e24a1b..1bf1f36d14 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -145,19 +145,20 @@ test('T7796', [], run_command, ['$MAKE -s --no-print-directory T7796']) test('T5550', omit_ways(prof_ways), compile, ['']) test('T7865', normal, run_command, ['$MAKE -s --no-print-directory T7865']) test('T7785', only_ways(['optasm']), compile, ['-ddump-rules']) -test('T7702', +test('T7702', [extra_files(['T7702plugin']), pre_cmd('$MAKE -s --no-print-directory -C T7702plugin package.T7702 TOP={top}'), - clean_cmd('$MAKE -s --no-print-directory -C T7702plugin clean.T7702'), - # we say 18mb peak allocated +/- 70% because other compiler flags have - # a large effect on allocation which is hard to separate from the - # allocation done by the plugin... but a regression allocates > 90mb + clean_cmd('$MAKE -s --no-print-directory -C T7702plugin clean.T7702'), + # we say 18mb peak allocated +/- 70% because other compiler flags have + # a large effect on allocation which is hard to separate from the + # allocation done by the plugin... but a regression allocates > 90mb compiler_stats_num_field('peak_megabytes_allocated', - [(wordsize(32), 18, 70), (wordsize(64), 18, 70)]) - ], - compile, + [(wordsize(32), 18, 70), (wordsize(64), 18, 70)]) + ], + compile, ['-v0 -package-db T7702plugin/pkg.T7702/local.package.conf -fplugin T7702Plugin -package T7702plugin ' + config.plugin_way_flags]) +test('T7944', normal, compile, ['-O2']) test('T7995', # RULE doesn't seem to fire unless optimizations are turned on. # This seems reasonable, so I've required it for the test. -- EZY 20130720 |