test: add a test that caused gccgo to crash

R=golang-dev
CC=golang-dev
https://golang.org/cl/6849129
This commit is contained in:
Ian Lance Taylor 2012-11-30 14:14:51 -08:00
parent 253ed02918
commit 0304a48595

18
test/fixedbugs/bug471.go Normal file
View file

@ -0,0 +1,18 @@
// compile
// Copyright 2012 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.
// Caused an internal compiler error in gccgo.
package p
type C chan struct{}
func (c C) F() {
select {
case c <- struct{}{}:
default:
}
}