summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/simpl018.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/simpl018.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/simpl018.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/simpl018.hs b/testsuite/tests/simplCore/should_compile/simpl018.hs
new file mode 100644
index 0000000000..1b7ce8ddcd
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/simpl018.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE UnboxedTuples #-}
+
+-- See Note [Float coercions (unlifted)] in Simplify
+-- This one gave a CoreLint error when compiled optimised
+--
+-- See also Trac #1718, of which this is a simplified version
+
+module ShouldCompile where
+
+bar :: Bool -> Int
+bar x = case (case x of { True -> (# 2,3 #); False -> error "urk" }) of
+ (# p,q #) -> p+q