mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
30088ac9a3
commit
f54c0db859
4 changed files with 32 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue