if w == nil {
w = x.newArgToMemOrRegs(source, w, off, i, rt, pos)
}
+ if t.IsPtrShaped() {
+ // Preserve the original store type. This ensures pointer type
+ // properties aren't discarded (e.g, notinheap).
+ if rt.Width != t.Width || len(pa.Registers) != 1 || i != loadRegOffset {
+ b.Func.Fatalf("incompatible store type %v and %v, i=%d", t, rt, i)
+ }
+ rt = t
+ }
mem = x.storeArgOrLoad(pos, b, w, mem, rt, storeOffset+off, i, storeRc.next(rt))
}
return mem
for _, v := range b.Values {
if v.Op == OpStore {
t := v.Aux.(*types.Type)
- if t.IsPtrShaped() { // Everything already fits, and this ensures pointer type properties aren't discarded (e.g, notinheap)
- continue
- }
source := v.Args[1]
tSrc := source.Type
iAEATt := x.isAlreadyExpandedAggregateType(t)
--- /dev/null
+// compile
+
+// Copyright 2021 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.
+
+// Issue 45344: expand_calls does not handle direct interface
+// typed argument well.
+
+package p
+
+type T struct {
+ a map[int]int
+}
+
+func F(t T) {
+ G(t)
+}
+
+func G(...interface{})