runtime: add padding to FFI type of struct ending with zero-sized field
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 15 Jan 2019 23:21:24 +0000 (23:21 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 15 Jan 2019 23:21:24 +0000 (23:21 +0000)
commitb7ec44e82bb50bd3adc294aa7e87252c79ea7294
tree05ae442ca2773c5cbe254e50ce99ba0604f24614
parent5e95646e734c1c64ea4e1a761b414581534e1d8c
runtime: add padding to FFI type of struct ending with zero-sized field

    CL 157557 changes the compiler to add one byte padding to
    non-empty struct ending with a zero-sized field. Add the same
    padding to the FFI type, so reflect.Call works.

    This fixes test/fixedbugs/issue26335.go in the main repo.

    Reviewed-on: https://go-review.googlesource.com/c/158018

From-SVN: r267956
gcc/go/gofrontend/MERGE
libgo/go/runtime/ffi.go