compiler: pad structs ending with zero-sized field
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 11 Jan 2019 23:16:38 +0000 (23:16 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 11 Jan 2019 23:16:38 +0000 (23:16 +0000)
commit378b9abe569d030bbe33f74a55b55519da9bf4bb
tree26a52b4f0cb3e0afea37c0d4d34dc606b77009ec
parent3ddf08b3b8ed5b0b0fe6c930eefb97228ae80caa
compiler: pad structs ending with zero-sized field

    For a struct with zero-sized last field, the address of the
    field falls out of the object boundary, which confuses the
    garbage collector. Pad an extra byte in this case.

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

From-SVN: r267861
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/types.cc
gcc/go/gofrontend/types.h