Merge from trunk
[official-gcc.git] / gcc / testsuite / go.test / test / fixedbugs / bug477.go
blob86289afa6db2305292f2470dad0a22a6aa256ea4
1 // compile
3 // Copyright 2013 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.
7 // Test multiple identical unnamed structs with methods. This caused
8 // a compilation error with gccgo.
10 package p
12 type S1 struct{}
14 func (s S1) M() {}
16 type S2 struct {
17 F1 struct {
20 F2 struct {
25 type I interface {
26 M()
29 func F() {
30 var s2 S2
31 var i1 I = s2.F1
32 var i2 I = s2.F2
33 _, _ = i1, i2