mirror of
https://github.com/golang/go
synced 2024-11-14 13:20:30 -07:00
00bee6d9a4
Now we have 8-byte alignment types on 32-bit system, so in some rare case, e.g, generated wrapper for embedded interface, the function argument may need more than 4 byte alignment. We could pad somehow, but this is a rare case which makes it hard to ensure that we've got it right. So relaxing the check for argument and return value region of the stack. Fixes #54991 Change-Id: I34986e17a920254392a39439ad3dcb323da2ea8d Reviewed-on: https://go-review.googlesource.com/c/go/+/431098 Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
30 lines
348 B
Go
30 lines
348 B
Go
// compile
|
|
|
|
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package p
|
|
|
|
import (
|
|
"sync/atomic"
|
|
)
|
|
|
|
type I interface {
|
|
M()
|
|
}
|
|
|
|
type S struct{}
|
|
|
|
func (*S) M() {}
|
|
|
|
type T struct {
|
|
I
|
|
x atomic.Int64
|
|
}
|
|
|
|
func F() {
|
|
t := &T{I: &S{}}
|
|
t.M()
|
|
}
|