From 6711fa70cecce261662c20613cc63eec0c21a16a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 1 Aug 2017 15:06:36 -0700 Subject: [PATCH] test: add test that caused gccgo compiler crash Updates #21253 Change-Id: Iece71a27207b578618cafb378dac2362517363d0 Reviewed-on: https://go-review.googlesource.com/52531 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Than McIntosh Reviewed-by: Brad Fitzpatrick --- test/fixedbugs/issue21253.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/fixedbugs/issue21253.go diff --git a/test/fixedbugs/issue21253.go b/test/fixedbugs/issue21253.go new file mode 100644 index 0000000000..3531b2b81f --- /dev/null +++ b/test/fixedbugs/issue21253.go @@ -0,0 +1,27 @@ +// compile + +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Gccgo crashed compiling this code due to failing to finalize +// interfaces in the right order. + +package p + +type s1 struct { + f m + I +} + +type m interface { + Mm(*s2) +} + +type s2 struct { + *s1 +} + +type I interface { + MI() +} -- 2.50.0