summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_run/fptr02.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ffi/should_run/fptr02.hs')
-rw-r--r--testsuite/tests/ffi/should_run/fptr02.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/ffi/should_run/fptr02.hs b/testsuite/tests/ffi/should_run/fptr02.hs
new file mode 100644
index 0000000000..4691427c3e
--- /dev/null
+++ b/testsuite/tests/ffi/should_run/fptr02.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE ForeignFunctionInterface #-}
+
+module Main where
+
+import Foreign
+import Control.Monad
+
+foreign import ccall "&free" pfree :: FunPtr (Ptr a -> IO ())
+
+main = replicateM_ 1000000 $ newForeignPtr pfree nullPtr