cmd/compile, cmd/cgo: align complex{64,128} like GCC

complex64 and complex128 are treated like [2]float32 and [2]float64,
so it makes sense to align them the same way.

Change-Id: Ic614bcdcc91b080aeb1ad1fed6fc15ba5a2971f8
Reviewed-on: https://go-review.googlesource.com/19800
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Matthew Dempsky 2016-02-21 02:28:37 -08:00
parent 30088ac9a3
commit f54c0db859
4 changed files with 32 additions and 4 deletions

View file

@ -1641,7 +1641,7 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
case 16:
t.Go = c.complex128
}
if t.Align = t.Size; t.Align >= c.ptrSize {
if t.Align = t.Size / 2; t.Align >= c.ptrSize {
t.Align = c.ptrSize
}