https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71917
--- Comment #12 from Matthew Fortune <matthew.fortune at imgtec dot com> --- Created attachment 39593 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39593&action=edit Proposed fix Attached fix should resolve the issue on sparc64 BE. The original attempt at the fix for mips64el is reverted and instead the rvalue conversion for the native FFI interface now copes with 64-bit little endian targets ensuring sign/zero extension is performed appropriately. The fix is for all architectures but presumably others do not suffer if the sign/zero extension is missing (or have not noticed).