https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91781
--- Comment #5 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> --- Author: ian Date: Tue Sep 17 20:24:00 2019 New Revision: 275813 URL: https://gcc.gnu.org/viewcvs?rev=275813&root=gcc&view=rev Log: PR go/91781 reflect: promote integer closure return to full word The libffi library expects an integer return type to be promoted to a full word. Implement that when returning from a closure written in Go. This only matters on big-endian systems when returning an integer smaller than the pointer size, which is why we didn't notice it until now. Fixes https://gcc.gnu.org/PR91781. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/195858 Modified: trunk/gcc/go/gofrontend/MERGE trunk/libgo/go/reflect/makefunc_ffi.go trunk/libgo/go/reflect/makefunc_ffi_c.c trunk/libgo/runtime/go-reflect-call.c