For the 32-bit N32 ABI, cls_pointer.c and cls_pointer_stack.c fail on IRIX 6.5: FAIL: libffi.call/cls_pointer.c -O0 -W -Wall (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/irix/libffi/testsuite/libffi.call/cls_pointer.c: In function 'main': /vol/gcc/src/hg/trunk/irix/libffi/testsuite/libffi.call/cls_pointer.c:68:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] FAIL: libffi.call/cls_pointer_stack.c -O0 -W -Wall (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/irix/libffi/testsuite/libffi.call/cls_pointer_stack.c: In function 'main': /vol/gcc/src/hg/trunk/irix/libffi/testsuite/libffi.call/cls_pointer_stack.c:132:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] In both cases, a void * is casted to ffi_arg, which in the N32 case is # ifdef FFI_MIPS_O32 /* O32 stack frames have 32bit integer args */ typedef unsigned int ffi_arg __attribute__((__mode__(__SI__))); typedef signed int ffi_sarg __attribute__((__mode__(__SI__))); #else /* N32 and N64 frames have 64bit integer args */ typedef unsigned int ffi_arg __attribute__((__mode__(__DI__))); typedef signed int ffi_sarg __attribute__((__mode__(__DI__))); # endif (cf. src/mips/ffitarget.h), i.e. a 64-bit type. I'm not sure what the best way is to portably fix this.
Mine, patch posted.
Author: ro Date: Wed Feb 9 10:01:07 2011 New Revision: 169963 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169963 Log: 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. Modified: trunk/libffi/ChangeLog trunk/libffi/testsuite/libffi.call/cls_pointer.c trunk/libffi/testsuite/libffi.call/cls_pointer_stack.c
Author: ro Date: Wed Feb 9 14:40:15 2011 New Revision: 169972 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169972 Log: 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. Modified: branches/gcc-4_5-branch/libffi/ChangeLog branches/gcc-4_5-branch/libffi/testsuite/libffi.call/cls_pointer.c branches/gcc-4_5-branch/libffi/testsuite/libffi.call/cls_pointer_stack.c
Fixed for 4.5.3, 4.6.0.