From: Ian Lance Taylor Date: Thu, 26 Oct 2017 20:39:41 +0000 (-0700) Subject: test: add type alias test that caused gccgo to crash X-Git-Tag: go1.10beta1~573 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6222997047dda627e9b65c880e772ac5042d62d8;p=gostls13.git test: add type alias test that caused gccgo to crash Change-Id: I3b388e4ac05ace5b7768ade03df2bee5bcc26ba8 Reviewed-on: https://go-review.googlesource.com/73790 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Than McIntosh --- diff --git a/test/fixedbugs/bug505.go b/test/fixedbugs/bug505.go new file mode 100644 index 0000000000..062a087168 --- /dev/null +++ b/test/fixedbugs/bug505.go @@ -0,0 +1,20 @@ +// 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 file with a failed conversion to the +// alias type when constructing the composite literal. + +package p + +type I interface{ M() } +type A = I +type S struct { + f A +} + +func F(i I) S { + return S{f: i} +}