[commit: ghc] wip/T16039: check the number of remaining stg_IND_STATIC_info occurrences (784cfbf)

git at git.haskell.org git at git.haskell.org
Sun Mar 31 15:07:32 UTC 2019


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

On branch  : wip/T16039
Link       : http://ghc.haskell.org/trac/ghc/changeset/784cfbfcea9cb04424e2ba116508b5948fdf0f13/ghc

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

commit 784cfbfcea9cb04424e2ba116508b5948fdf0f13
Author: Gabor Greif <ggreif at gmail.com>
Date:   Wed Jan 2 18:02:10 2019 +0100

    check the number of remaining stg_IND_STATIC_info occurrences


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

784cfbfcea9cb04424e2ba116508b5948fdf0f13
 testsuite/tests/simplCore/should_compile/Makefile                 | 8 +++++++-
 .../opt/T15188.stdout => simplCore/should_compile/T16039.stdout}  | 1 +
 testsuite/tests/simplCore/should_compile/all.T                    | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 277a5a6..f735ffe 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -250,4 +250,10 @@ T14140:
 T15631:
 	$(RM) -f T15631.o T15631.hi
 	'$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-uniques T15631.hs | grep 'case'
-# Expecting one fewwer case expressions after fixing Trac #15631
+# Expecting one fewer case expressions after fixing Trac #15631
+
+# Expecting 2 IND_STATIC closures originally; one less with #16039 fixed
+T16039:
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O -ddump-llvm T16039.hs 2>/dev/null \
+	| grep -F 'closure$$def' | grep -E "stg_IND_STATIC_info" \
+	| wc -l | sed -e 's/ *//g' | grep "1"; echo $$?
diff --git a/testsuite/tests/cmm/opt/T15188.stdout b/testsuite/tests/simplCore/should_compile/T16039.stdout
similarity index 50%
copy from testsuite/tests/cmm/opt/T15188.stdout
copy to testsuite/tests/simplCore/should_compile/T16039.stdout
index d00491f..b261da1 100644
--- a/testsuite/tests/cmm/opt/T15188.stdout
+++ b/testsuite/tests/simplCore/should_compile/T16039.stdout
@@ -1 +1,2 @@
 1
+0
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 6f68ec2..9e02252 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -328,4 +328,4 @@ test('T15631',
      ['$MAKE -s --no-print-directory T15631'])
 test('T15673', normal, compile, ['-O'])
 
-test('T16039', normal, compile, ['-O'])
+test('T16039', normal, run_command, ['$MAKE -s --no-print-directory T16039'])



More information about the ghc-commits mailing list