diff --git a/ghc/tests/reader/should_compile/read011.hs b/ghc/tests/reader/should_compile/read011.hs
new file mode 100644
index 0000000000000000000000000000000000000000..5b1d7d5197f12e7dd4c6f2512e2154e9a40352eb
--- /dev/null
+++ b/ghc/tests/reader/should_compile/read011.hs
@@ -0,0 +1,24 @@
+--!!! do & where interaction
+module ShouldSucceed where
+
+f1 :: IO a -> IO [a]
+f1 x = do
+  v <- x
+  return [v]
+ where
+  g x = [x,x]
+
+f2 :: IO a -> IO [a]
+f2 x = do
+  v <- x
+  return (g v)
+   where
+    g x = [x,x]
+
+f3 :: IO a -> IO [a]
+f3 x = do
+  v <- x
+  return (g v)
+  where
+   g x = [x,x]
+