summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar/should_run/T18151.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-09 14:25:49 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-01 06:33:37 -0400
commitb0c1f2a619855a6fa22021a3118365c49f4cc0c4 (patch)
treeb2c0db42884594fbd00c125d22eb63eed662e456 /testsuite/tests/deSugar/should_run/T18151.hs
parent389920858e0b9efe5234cb7dac55d06e955768f7 (diff)
downloadhaskell-b0c1f2a619855a6fa22021a3118365c49f4cc0c4.tar.gz
testsuite: Add test for #18151
Diffstat (limited to 'testsuite/tests/deSugar/should_run/T18151.hs')
-rw-r--r--testsuite/tests/deSugar/should_run/T18151.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_run/T18151.hs b/testsuite/tests/deSugar/should_run/T18151.hs
new file mode 100644
index 0000000000..b17c8a9ff0
--- /dev/null
+++ b/testsuite/tests/deSugar/should_run/T18151.hs
@@ -0,0 +1,10 @@
+-- According to the Report this should reduce to (). However, in #18151 it was
+-- reported that GHC bottoms.
+x :: ()
+x = seq (True `undefined`) ()
+{-# NOINLINE x #-}
+
+main :: IO ()
+main = do
+ print x
+