summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/linking/T15729.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghci/linking/T15729.hs')
-rw-r--r--testsuite/tests/ghci/linking/T15729.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/linking/T15729.hs b/testsuite/tests/ghci/linking/T15729.hs
new file mode 100644
index 0000000000..f35f96eac1
--- /dev/null
+++ b/testsuite/tests/ghci/linking/T15729.hs
@@ -0,0 +1,14 @@
+module T15729 (main) where
+
+import Foreign
+import Foreign.C
+
+foreign import ccall unsafe "readBss"
+ readBss :: Int -> IO Int
+
+main :: IO ()
+main = do
+ prefix <- mapM readBss [0 .. 10]
+ print prefix
+ samples <- mapM readBss [0, 19 .. bit 20 - 1]
+ print $ foldr1 (.|.) samples