As reported in the PR, the recent libffi import into the gcc tree caused a couple of testsuite failures on 64-bit big-endian targets (like SPARC or PowerPC). The following patch (mostly by Dominique) fixes them and finally gets us clean libffi testsuite results. Tested on sparc-sun-solaris2.11 on mainline and 4.8 branch and x86_64-unknown-linux-gnu on mainline by myself and powerpc-apple-darwin9 by Dominique. Ok for mainline and 4.8 branch where those failures represent regressions from 4.7? Rainer 2013-05-15 Dominique d'Humieres Rainer Orth PR libffi/56033 * testsuite/libffi.call/cls_struct_va1.c (test_fn): Cast resp to ffi_arg *. * testsuite/libffi.call/cls_uint_va.c (cls_ret_T_fn): Likewise. * testsuite/libffi.call/va_1.c (main): Change res to ffi_arg. * testsuite/libffi.call/va_struct1.c (main): Likewise.