1// run 2 3// Copyright 2015 The Go Authors. All rights reserved. 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file. 6 7// A generated method with a return value large enough to be 8// initialized by duffzero is not a leaf method, which violated 9// assumptions made by cmd/internal/obj/ppc64. 10 11package main 12 13const N = 9 // values > 8 cause (Super).Method to use duffzero 14 15type Base struct { 16} 17 18func (b *Base) Method() (x [N]uintptr) { 19 return 20} 21 22type Super struct { 23 Base 24} 25 26type T interface { 27 Method() [N]uintptr 28} 29 30func f(q T) { 31 q.Method() 32} 33 34func main() { 35 var s Super 36 f(&s) 37} 38