Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/da88dbd817e5fbed7de2d41229997405bf1a856d >--------------------------------------------------------------- commit da88dbd817e5fbed7de2d41229997405bf1a856d Author: Simon Peyton Jones <simo...@microsoft.com> Date: Tue Jan 8 23:19:43 2013 +0000 Test Trac #5366 >--------------------------------------------------------------- tests/simplCore/should_compile/Makefile | 3 +++ tests/simplCore/should_compile/T5366.hs | 8 ++++++++ tests/simplCore/should_compile/T5366.stdout | 2 ++ tests/simplCore/should_compile/all.T | 4 ++++ 4 files changed, 17 insertions(+), 0 deletions(-) diff --git a/tests/simplCore/should_compile/Makefile b/tests/simplCore/should_compile/Makefile index 1c2372d..a4fa8ad 100644 --- a/tests/simplCore/should_compile/Makefile +++ b/tests/simplCore/should_compile/Makefile @@ -88,3 +88,6 @@ T7165: '$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 T7165a.hs -dcore-lint '$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 T7165.hs -dcore-lint +T5366: + $(RM) -f T5366.hi T5366.o + '$(TEST_HC)' $(TEST_HC_OPTS) -ddump-simpl -dsuppress-uniques -c -O T5366.hs | grep 'Bar.*I#' diff --git a/tests/simplCore/should_compile/T5366.hs b/tests/simplCore/should_compile/T5366.hs new file mode 100644 index 0000000..ce3b452 --- /dev/null +++ b/tests/simplCore/should_compile/T5366.hs @@ -0,0 +1,8 @@ +module T5366 where + +newtype Id a = Id Int +data Foo = Foo {-# UNPACK #-} !(Id Foo) String +data Bar = Bar {-# UNPACK #-} !Foo + +f :: Bar -> Int +f (Bar (Foo (Id x) _)) = x diff --git a/tests/simplCore/should_compile/T5366.stdout b/tests/simplCore/should_compile/T5366.stdout new file mode 100644 index 0000000..b0c2249 --- /dev/null +++ b/tests/simplCore/should_compile/T5366.stdout @@ -0,0 +1,2 @@ + case ds of _ { T5366.Bar dt [Occ=Once] _ -> GHC.Types.I# dt }}] + case ds of _ { T5366.Bar dt dt1 -> GHC.Types.I# dt } diff --git a/tests/simplCore/should_compile/all.T b/tests/simplCore/should_compile/all.T index b25e25b..5787149 100644 --- a/tests/simplCore/should_compile/all.T +++ b/tests/simplCore/should_compile/all.T @@ -156,3 +156,7 @@ test('T7165', ['$MAKE -s --no-print-directory T7165']) test('T7287', normal, compile, ['']) test('T7360', only_ways(['optasm']), compile, ['-ddump-simpl -dsuppress-uniques']) +test('T5366', + normal, + run_command, + ['$MAKE -s --no-print-directory T5366']) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc