This only seems to occur on powerpc 64 BE. --- FAIL: TestMethodValue (0.00s) all_test.go:2290: Int32Method returned 45088; want 456 FAIL FAIL: reflect ------------------------------------------------------------------------ r275691 | ian | 2019-09-12 18:22:53 -0500 (Thu, 12 Sep 2019) | 4 lines libgo: update to Go1.13 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698
Does this work at SVN revision r275611?
Oh, never mind, this is a new test in r275691, this code has probably never worked on ppc64be.
Sorry, I missed this was a new test case. And no, it still doesn't work with current trunk.
For reflect to work there needs to be support for go closures in libffi.
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
Thanks for reporting this. It should be fixed. (To Andreas's point, there is already Go closure support in libffi for PPC64.)