testsuite: Add test for #14272
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 26 Sep 2017 16:02:27 +0000 (12:02 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 26 Sep 2017 16:02:28 +0000 (12:02 -0400)
Reviewers: austin

Subscribers: rwbarton, thomie

GHC Trac Issues: #14272

Differential Revision: https://phabricator.haskell.org/D4027

testsuite/tests/simplCore/should_compile/T14272.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T

diff --git a/testsuite/tests/simplCore/should_compile/T14272.hs b/testsuite/tests/simplCore/should_compile/T14272.hs
new file mode 100644 (file)
index 0000000..d520c06
--- /dev/null
@@ -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
index 72b872a..7f21331 100644 (file)
@@ -279,3 +279,5 @@ test('T14140',
      normal,
      run_command,
      ['$MAKE -s --no-print-directory T14140'])
+
+test('T14272', normal, compile, [''])