Commit dbe9ab69 authored by Keith Randall's avatar Keith Randall

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/11406Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent f81f6d6e
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment