OSDN Git Service

PR libffi/46661
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Feb 2011 10:01:07 +0000 (10:01 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Feb 2011 10:01:07 +0000 (10:01 +0000)
* testsuite/libffi.call/cls_pointer.c (main): Cast void * to
uintptr_t first.
* testsuite/libffi.call/cls_pointer_stack.c (main): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169963 138bc75d-0d04-0410-961f-82ee72b054a4

libffi/ChangeLog
libffi/testsuite/libffi.call/cls_pointer.c
libffi/testsuite/libffi.call/cls_pointer_stack.c

index 2516c17..4a889cb 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libffi/46661
+       * testsuite/libffi.call/cls_pointer.c (main): Cast void * to
+       uintptr_t first.
+       * testsuite/libffi.call/cls_pointer_stack.c (main): Likewise.
+
 2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
index fadd353..cf03993 100644 (file)
@@ -65,7 +65,7 @@ int main (void)
 
        CHECK(ffi_prep_closure_loc(pcl, &cif, cls_pointer_gn, NULL, code) == FFI_OK);
 
-       res = (ffi_arg)((void*(*)(void*, void*))(code))(arg1, arg2);
+       res = (ffi_arg)(uintptr_t)((void*(*)(void*, void*))(code))(arg1, arg2);
        /* { dg-output "\n0x12345678 0x89abcdef: 0x9be02467" } */
        printf("res: 0x%08x\n", (unsigned int) res);
        /* { dg-output "\nres: 0x9be02467" } */
index 697f271..d631cf8 100644 (file)
@@ -129,7 +129,7 @@ int main (void)
 
        CHECK(ffi_prep_closure_loc(pcl, &cif, cls_pointer_gn, NULL, code) == FFI_OK);
 
-       res = (ffi_arg)((void*(*)(void*, void*))(code))(arg1, arg2);
+       res = (ffi_arg)(uintptr_t)((void*(*)(void*, void*))(code))(arg1, arg2);
 
        printf("res: 0x%08x\n", (unsigned int) res);
        // { dg-output "\n0x01234567 0x89abcdef: 0x8acf1356" }