| 1 |
// compile |
| 2 |
|
| 3 |
// Copyright 2014 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 |
// Issue 7405: the equality function for struct with many |
| 8 |
// embedded fields became more complex after fixing issue 7366, |
| 9 |
// leading to out of registers on 386. |
| 10 |
|
| 11 |
package p |
| 12 |
|
| 13 |
type T1 struct { |
| 14 |
T2 |
| 15 |
T3 |
| 16 |
T4 |
| 17 |
} |
| 18 |
|
| 19 |
type T2 struct { |
| 20 |
Conn |
| 21 |
} |
| 22 |
|
| 23 |
type T3 struct { |
| 24 |
PacketConn |
| 25 |
} |
| 26 |
|
| 27 |
type T4 struct { |
| 28 |
PacketConn |
| 29 |
T5 |
| 30 |
} |
| 31 |
|
| 32 |
type T5 struct { |
| 33 |
x int |
| 34 |
T6 |
| 35 |
} |
| 36 |
|
| 37 |
type T6 struct { |
| 38 |
y, z int |
| 39 |
} |
| 40 |
|
| 41 |
type Conn interface { |
| 42 |
A() |
| 43 |
} |
| 44 |
|
| 45 |
type PacketConn interface { |
| 46 |
B() |
| 47 |
} |
| 48 |
|
| 49 |
func F(a, b T1) bool { |
| 50 |
return a == b |
| 51 |
} |