1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:10:23 -07:00

cmd/compile/internal/gc: make sure nonzero-sized objects have nonzero alignment

See issue #11354.

Change-Id: I6817d499e6c02e4a9c83f80bc66a2bee368a69ec
Reviewed-on: https://go-review.googlesource.com/11406
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Keith Randall 2015-06-24 07:23:40 -07:00
parent f81f6d6ee8
commit dbe9ab69d9

View File

@ -119,6 +119,10 @@ func dowidth(t *Type) {
}
if t.Width > 0 {
if t.Align == 0 {
// See issue 11354
Fatal("zero alignment with nonzero size %v", t)
}
return
}