Failing test case for #12076.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 17 May 2016 04:05:24 +0000 (21:05 -0700)
committerBen Gamari <ben@smart-cactus.org>
Wed, 18 May 2016 20:03:14 +0000 (22:03 +0200)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: austin, bgamari

Subscribers: thomie

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

GHC Trac Issues: #12076

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

diff --git a/testsuite/tests/simplCore/should_compile/T12076.hs b/testsuite/tests/simplCore/should_compile/T12076.hs
new file mode 100644 (file)
index 0000000..8b35039
--- /dev/null
@@ -0,0 +1,2 @@
+import T12076a
+main = f `seq` return ()
diff --git a/testsuite/tests/simplCore/should_compile/T12076a.hs b/testsuite/tests/simplCore/should_compile/T12076a.hs
new file mode 100644 (file)
index 0000000..2e5acc9
--- /dev/null
@@ -0,0 +1,15 @@
+{-# OPTIONS_GHC -O0 #-}
+module T12076a(f) where
+
+import GHC.Exts
+
+{-# NOINLINE z #-}
+z = ()
+
+f :: () -> ()
+f _ = let x = lazy z
+      in g x x
+
+{-# NOINLINE g #-}
+g :: () -> () -> ()
+g _ _ = ()
index 0e03b16..b1b7d64 100644 (file)
@@ -236,3 +236,5 @@ test('T3990',
      normal,
      run_command,
      ['$MAKE -s --no-print-directory T3990'])
+
+test('T12076', [expect_broken(12076), extra_clean(['T12076a.hi', 'T12076a.o'])], multimod_compile, ['T12076', '-v0'])