ssa: fix reentrant of ABI initialization

This commit is contained in:
Li Jie
2024-06-20 20:05:23 +08:00
parent a137a70278
commit e7fcb068d9

View File

@@ -322,7 +322,7 @@ func (p Package) abiTypeInit(g Global, t types.Type, pub bool) {
if kind == abi.Integer || kind == abi.BitCast {
// abi.Type.Kind_ |= abi.KindDirectIface
const kindDirectIface = 1 << 5
pkind := b.FieldAddr(vexpr, 6)
pkind := b.FieldAddr(b.Load(expr), 6)
b.Store(pkind, b.BinOp(token.OR, b.Load(pkind), Expr{prog.IntVal(kindDirectIface, prog.Byte()).impl, prog.Byte()}))
}