gcc/testsuite/go.test/test/fixedbugs/issue21253.go
raw| 1 | // compile |
| 2 | |
| 3 | // Copyright 2017 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 | // Gccgo crashed compiling this code due to failing to finalize |
| 8 | // interfaces in the right order. |
| 9 | |
| 10 | package p |
| 11 | |
| 12 | type s1 struct { |
| 13 | f m |
| 14 | I |
| 15 | } |
| 16 | |
| 17 | type m interface { |
| 18 | Mm(*s2) |
| 19 | } |
| 20 | |
| 21 | type s2 struct { |
| 22 | *s1 |
| 23 | } |
| 24 | |
| 25 | type I interface { |
| 26 | MI() |
| 27 | } |