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.

Change-Id: I44c2b52f0353eff81725fe18084a229b44e0c344
Reviewed-on: https://go-review.googlesource.com/c/157557
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 files changed