Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/832fa64008548c6be4190da0a79a2b6e339eb7bd >--------------------------------------------------------------- commit 832fa64008548c6be4190da0a79a2b6e339eb7bd Author: Simon Marlow <[email protected]> Date: Mon Apr 30 12:26:49 2012 +0100 Fix capi_value on Windows This appears to be a bug in the gcc that we're currently using. Compiling this, with -O: const int i; int f(void) {return i;} results in this assembly: pushl %ebp movl %esp, %ebp movl $0, %eax <--- the $0 is wrong, should be _i leave ret Turning off -O makes it work. Maybe time to update our mingw gcc bundles? >--------------------------------------------------------------- tests/ffi/should_run/capi_value_c.c | 2 +- tests/ffi/should_run/capi_value_c.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ffi/should_run/capi_value_c.c b/tests/ffi/should_run/capi_value_c.c index 45db07c..5d37a7f 100644 --- a/tests/ffi/should_run/capi_value_c.c +++ b/tests/ffi/should_run/capi_value_c.c @@ -1,4 +1,4 @@ #include "capi_value_c.h" -const int i = 23; +int i = 23; diff --git a/tests/ffi/should_run/capi_value_c.h b/tests/ffi/should_run/capi_value_c.h index d8ef814..cec1863 100644 --- a/tests/ffi/should_run/capi_value_c.h +++ b/tests/ffi/should_run/capi_value_c.h @@ -1,3 +1,3 @@ -const int i; +extern int i; #define j 24 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
