Commit 9f86ec95 authored by simonmar's avatar simonmar

[project @ 2002-03-13 11:34:41 by simonmar]

Add test for passing float args to a C function through the FFI.
parent ddb3ea22
......@@ -12,3 +12,5 @@ test "ffi001" { vtr("-fglasgow-exts", "", "") }
-- separately.
test "ffi002" { skip when True
vtr("ffi002.c -fglasgow-exts -no-hs-main", "", "") }
test "ffi003" { vtr("-fglasgow-exts", "", "") }
{-# OPTIONS -fasm #-}
-- !!! Test passing floats to a ccall, was broken in the NCG in 5.02.2
import Foreign
import Foreign.C
foreign import ccall unsafe
printf :: CString -> Float -> IO CInt
main = withCString "%f" $ \s -> printf s 1.2345
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