Commit 6fc5cb06 authored by Simon Marlow's avatar Simon Marlow

test for #2469

parent 6a83fcc3
import Foreign
import Foreign.C
type IOF = Int -> IO Int
foreign import ccall "wrapper" wrap_f_io :: IOF -> IO (FunPtr IOF)
foreign import ccall "dynamic" f_io :: FunPtr IOF -> IOF
double_io :: Int -> IO Int
double_io x = return (x * 2)
main = do
double2 <- wrap_f_io double_io
x <- f_io double2 42
return ()
......@@ -122,3 +122,5 @@ test('2276_ghci', [ skip_if_not_windows, only_ways(['ghci']),
cmd_prefix('$MAKE --no-print-directory 2276_ghci_setup && '),
extra_clean(['2276_ghci_c.o']) ],
compile_and_run, ['-fobject-code 2276_ghci_c.o'])
test('2469', normal, compile_and_run, ['-optc-std=gnu99'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment