Ian Lance Taylor | 193ff39 | 2013-01-31 15:59:30 -0800 | [diff] [blame] | 1 | // compile |
| 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2013 The Go Authors. All rights reserved. |
Ian Lance Taylor | 193ff39 | 2013-01-31 15:59:30 -0800 | [diff] [blame] | 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | // Caused gccgo to emit multiple definitions of the same symbol. |
| 8 | |
| 9 | package p |
| 10 | |
| 11 | type S1 struct{} |
| 12 | |
| 13 | func (s *S1) M() {} |
| 14 | |
| 15 | type S2 struct { |
| 16 | F struct{ *S1 } |
| 17 | } |
| 18 | |
| 19 | func F() { |
| 20 | _ = struct{ *S1 }{} |
| 21 | } |