[commit: ghc] master: Fix test for T12877 (1b06231)

git at git.haskell.org git at git.haskell.org
Fri Dec 23 22:48:29 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1b06231ea9063d753a2755a7fc4aeadcc2fc58b9/ghc

>---------------------------------------------------------------

commit 1b06231ea9063d753a2755a7fc4aeadcc2fc58b9
Author: Sylvain Henry <sylvain at haskus.fr>
Date:   Fri Dec 23 14:36:10 2016 -0500

    Fix test for T12877
    
    Summary: See https://phabricator.haskell.org/rGHCd3b546b1a605
    
    Reviewers: nomeata, austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2883


>---------------------------------------------------------------

1b06231ea9063d753a2755a7fc4aeadcc2fc58b9
 testsuite/tests/perf/compiler/all.T                    | 18 ------------------
 testsuite/tests/simplCore/should_compile/Makefile      |  4 ++++
 .../compiler => simplCore/should_compile}/T12877.hs    |  5 +----
 testsuite/tests/simplCore/should_compile/all.T         |  1 +
 4 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 9c50fa8..2714e86 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -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'])
-
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 5791daf..2efb8bd 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -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
diff --git a/testsuite/tests/perf/compiler/T12877.hs b/testsuite/tests/simplCore/should_compile/T12877.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
--- a/testsuite/tests/perf/compiler/T12877.hs
+++ b/testsuite/tests/simplCore/should_compile/T12877.hs
@@ -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]))]
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index e09880f..91a89a8 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -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,



More information about the ghc-commits mailing list