[commit: testsuite] master: Test Trac #5996 (a80663d)

git at git.haskell.org git at git.haskell.org
Tue Nov 12 23:42:46 UTC 2013


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a80663d37b7a8c834537c700528383a65e50fbdf/testsuite

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

commit a80663d37b7a8c834537c700528383a65e50fbdf
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Nov 12 23:42:10 2013 +0000

    Test Trac #5996


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

a80663d37b7a8c834537c700528383a65e50fbdf
 tests/simplCore/should_compile/Makefile     |    4 ++++
 tests/simplCore/should_compile/T5996.hs     |   12 ++++++++++++
 tests/simplCore/should_compile/T5996.stdout |    2 ++
 tests/simplCore/should_compile/all.T        |    4 ++++
 4 files changed, 22 insertions(+)

diff --git a/tests/simplCore/should_compile/Makefile b/tests/simplCore/should_compile/Makefile
index f656e4e..60ad4c7 100644
--- a/tests/simplCore/should_compile/Makefile
+++ b/tests/simplCore/should_compile/Makefile
@@ -111,3 +111,7 @@ T7995:
 T8221:
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221a.hs
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221.hs
+
+T5996:
+	$(RM) -f T5996.o T5996.hi
+	'$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5996.hs -ddump-simpl -dsuppress-uniques -dsuppress-all | grep y2
diff --git a/tests/simplCore/should_compile/T5996.hs b/tests/simplCore/should_compile/T5996.hs
new file mode 100644
index 0000000..bbe7599
--- /dev/null
+++ b/tests/simplCore/should_compile/T5996.hs
@@ -0,0 +1,12 @@
+module T5996 where
+
+data C a b = C a b
+a = undefined
+{-# NOINLINE a #-}
+b = undefined
+{-# NOINLINE b #-}
+
+x1 = C a b
+x2 = C x1 b
+y1 = C a b
+y2 = C y1 b
diff --git a/tests/simplCore/should_compile/T5996.stdout b/tests/simplCore/should_compile/T5996.stdout
new file mode 100644
index 0000000..bac917e
--- /dev/null
+++ b/tests/simplCore/should_compile/T5996.stdout
@@ -0,0 +1,2 @@
+y2
+y2 = x2
diff --git a/tests/simplCore/should_compile/all.T b/tests/simplCore/should_compile/all.T
index 9e398bf..fa31898 100644
--- a/tests/simplCore/should_compile/all.T
+++ b/tests/simplCore/should_compile/all.T
@@ -193,3 +193,7 @@ test('T8221',
      run_command,
      ['$MAKE -s --no-print-directory T8221'])
 test('T8329', only_ways(['optasm']), multimod_compile, ['T8329','-v0 -O'])
+test('T5996',
+     normal,
+     run_command,
+     ['$MAKE -s --no-print-directory T5996'])



More information about the ghc-commits mailing list