This libgo patch by Cherry Zhang fixes the reflect package to correctly handle direct interface typed receiver in Value.call. A direct interface type's value method takes a value receiver now. Don't pass a pointer to the method function. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 270999) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -e3ba8828baf60343316bb68002e94570ee63ad1e +fcbf847c3bf76fb475c9020e1c57057134407263 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/go/reflect/value.go =================================================================== --- libgo/go/reflect/value.go (revision 270877) +++ libgo/go/reflect/value.go (working copy) @@ -401,7 +401,7 @@ func (v Value) call(op string, in []Valu if v.flag&flagMethod != 0 { nin++ } - firstPointer := len(in) > 0 && t.In(0).Kind() != Ptr && v.flag&flagMethodFn != 0 + firstPointer := len(in) > 0 && ifaceIndir(t.In(0).common()) && v.flag&flagMethodFn != 0 params := make([]unsafe.Pointer, nin) off := 0 if v.flag&flagMethod != 0 {