#1424: Argument corruption in FFI with many arguments (maybe 64-bit related)
-------------------------------+--------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (FFI) | Version: 6.6.1
Severity: normal | Resolution:
Keywords: ffi | Difficulty: Unknown
Os: Linux | Testcase:
Architecture: x86_64 (amd64) |
-------------------------------+--------------------------------------------
Comment (by Isaac Dupree):
See the warning from gcc {{{warning: incompatible implicit declaration of
built-in function ‘printf’}}}: it may be forced to use the wrong
calling convention (var-arg functions are at least allowed to be special):
try putting {{{#include <stdio.h>}}} at the beginning of your .c file (may
not help, but at least it'll be more correct and less that "could" be
going wrong). Also compare -fasm versus -fvia-C flags to GHC (for the
latter, you may need to include a C function prototype somehow, though).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1424>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs