runtime: skip zero-sized fields in structs when converting to FFI
commite1f7ba02d1279f97ed6673714f41316c513c8894
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Jul 2018 20:39:02 +0000 (13 20:39 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Jul 2018 20:39:02 +0000 (13 20:39 +0000)
tree56301120971100639a4f923361812cb8d0b79362
parent890efbebbdbc8b77c6e696ef240cca9f7de55faa
runtime: skip zero-sized fields in structs when converting to FFI

    The libffi library doesn't understand zero-sized objects.
    When we see a zero-sized field in a struct, just skip it when
    converting to the FFI data structures. There is no value to pass in
    any case, so not telling libffi about the field doesn't affect
    anything.

    The test case for this is https://golang.org/cl/123316.

    Fixes golang/go#26335

    Reviewed-on: https://go-review.googlesource.com/123335

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262651 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
libgo/go/runtime/ffi.go