[ ghc-Bugs-604466 ] x86 NCG bug with stdcall f.i. "wrapper"
noreply at sourceforge.net
noreply at sourceforge.net
Wed Sep 4 06:08:43 EDT 2002
Bugs item #604466, was opened at 2002-09-04 10:08
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=604466&group_id=8032
Category: Compiler (FFI)
Group: 5.04
Status: Open
Resolution: None
Priority: 5
Submitted By: Simon Marlow (simonmar)
Assigned to: Simon Marlow (simonmar)
Summary: x86 NCG bug with stdcall f.i. "wrapper"
Initial Comment:
Original message from Sven Panne:
HOpenGL did it once again... :-} The NCG for x86
doesn't honour the calling convention for "wrappers":
-- example module ------------------------------------
module CB where
import Foreign.C.Types ( CInt )
import Foreign.Ptr ( FunPtr )
type Callback = CInt -> IO ()
foreign import ccall "wrapper" makeCallback1 ::
Callback -> IO (FunPtr Callback)
foreign import stdcall "wrapper" makeCallback2 ::
Callback -> IO (FunPtr Callback)
-- shell transcript ----------------------------------
$ rm -f *.o ; ghc -c -fffi CB.hs ; nm *.o|grep _CB_d
U _CB_dS1
U _CB_dS2 <= !!!!!!!!!! @8 is missing
00000008 T _CB_dS1
00000070 T _CB_dS2 at 8
$ rm -f *.o ; ghc -c -fffi CB.hs -O ; nm *.o|grep
_CB_d
U _CB_dUu at 8
U _CB_dUv
00000070 T _CB_dUu at 8
------------------------------------------------------
I'd be grateful if this would be be fixed for the next
patchlevel release.
Cheers,
S.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=604466&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list