mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: fix 32-bit build
In 32-bit worlds, 8-byte objects are only aligned to 4-byte boundaries. Change-Id: I91469a9a67b1ee31dd508a4e105c39c815ecde58 Reviewed-on: https://go-review.googlesource.com/2581 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
fbe2845cdd
commit
7b2524217e
2 changed files with 4 additions and 2 deletions
|
|
@ -261,8 +261,8 @@ func TestTrailingZero(t *testing.T) {
|
|||
n int64
|
||||
z struct{}
|
||||
}
|
||||
if unsafe.Sizeof(T2{}) != 16 {
|
||||
t.Errorf("sizeof(%#v)==%d, want 16", T2{}, unsafe.Sizeof(T2{}))
|
||||
if unsafe.Sizeof(T2{}) != 8 + unsafe.Sizeof(Uintreg(0)) {
|
||||
t.Errorf("sizeof(%#v)==%d, want %d", T2{}, unsafe.Sizeof(T2{}), 8 + unsafe.Sizeof(Uintreg(0)))
|
||||
}
|
||||
type T3 struct {
|
||||
n byte
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue