Fix test for T12877
authorSylvain Henry <sylvain@haskus.fr>
Fri, 23 Dec 2016 19:36:10 +0000 (14:36 -0500)
committerBen Gamari <ben@smart-cactus.org>
Fri, 23 Dec 2016 21:44:48 +0000 (16:44 -0500)
Summary: See https://phabricator.haskell.org/rGHCd3b546b1a605

Reviewers: nomeata, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2883

testsuite/tests/perf/compiler/all.T
testsuite/tests/simplCore/should_compile/Makefile
testsuite/tests/simplCore/should_compile/T12877.hs [moved from testsuite/tests/perf/compiler/T12877.hs with 98% similarity]
testsuite/tests/simplCore/should_compile/all.T

index 9c50fa8..2714e86 100644 (file)
@@ -898,21 +898,3 @@ test('T12234',
      ],
      compile,
      [''])
-
-test('T12877',
-     [ stats_num_field('bytes allocated',
-          [(wordsize(64), 197582248, 5),
-          # initial:      197582248 (Linux)
-          ])
-
-     , compiler_stats_num_field('bytes allocated',
-          [(platform('x86_64-unknown-mingw32'), 118644280, 5),
-          # initial:      118644280
-
-           (wordsize(64), 135979000, 5),
-          # initial:      135979000 (Linux)
-          ]),
-     ],
-     compile_and_run,
-     ['-O2'])
-
index 5791daf..2efb8bd 100644 (file)
@@ -167,6 +167,10 @@ T5615:
        -grep 'remInt#' T5615.dump-simpl
        grep -c '1999#' T5615.dump-simpl
 
+# When this one works there are no 'plusWord' left at all
+T12877:
+       -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O T12877.hs -ddump-simpl | grep 'plusWord')
+
 T13025:
        $(RM) -f T13025.o T13025.hi T13025a.o T13025a.hi
        '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13025a.hs
similarity index 98%
rename from testsuite/tests/perf/compiler/T12877.hs
rename to testsuite/tests/simplCore/should_compile/T12877.hs
index 2fc7d58..8a23523 100644 (file)
@@ -1,3 +1,4 @@
+module Bug where
 -- This ugly cascading case reduces to:
 --    case x of
 --       0 -> "0"
@@ -111,7 +112,3 @@ test x = case x of
                                                                                                       34 -> "0"
                                                                                                       35 -> "1"
                                                                                                       _  -> "n"
-
-main :: IO ()
-main = do
-   putStrLn [last (concat (fmap test [0..12345678]))]
index e09880f..91a89a8 100644 (file)
@@ -254,6 +254,7 @@ test('T12603',
      normal,
      run_command,
      ['$MAKE -s --no-print-directory T12603'])
+test('T12877', normal, run_command, ['$MAKE -s --no-print-directory T12877'])
 test('T13027', normal, compile, [''])
 test('T13025',
      normal,