[commit: ghc] master: testsuite: Add test for #14272 (0ffa396)

git at git.haskell.org git at git.haskell.org
Tue Sep 26 16:02:59 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0ffa396d5421bc127759a62c2612920005423b15/ghc

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

commit 0ffa396d5421bc127759a62c2612920005423b15
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Tue Sep 26 12:02:27 2017 -0400

    testsuite: Add test for #14272
    
    Reviewers: austin
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #14272
    
    Differential Revision: https://phabricator.haskell.org/D4027


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

0ffa396d5421bc127759a62c2612920005423b15
 testsuite/tests/simplCore/should_compile/T14272.hs | 7 +++++++
 testsuite/tests/simplCore/should_compile/all.T     | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/testsuite/tests/simplCore/should_compile/T14272.hs b/testsuite/tests/simplCore/should_compile/T14272.hs
new file mode 100644
index 0000000..d520c06
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T14272.hs
@@ -0,0 +1,7 @@
+import Data.Bits (bit)
+
+main :: IO ()
+main = putStrLn (show (f undefined))
+
+f :: [Int] -> Int
+f = sum . zipWith ((+) . bit) [0..] . map undefined . scanl undefined undefined
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 72b872a..7f21331 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -279,3 +279,5 @@ test('T14140',
      normal,
      run_command,
      ['$MAKE -s --no-print-directory T14140'])
+
+test('T14272', normal, compile, [''])



More information about the ghc-commits mailing list