From: Ian Lance Taylor Date: Tue, 15 May 2012 20:29:46 +0000 (-0700) Subject: test: add bug439, valid code that caused a gccgo crash X-Git-Tag: go1.1rc2~3198 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6f6bbdf9b7de15b68b52649be35cd8b62a2edb9d;p=gostls13.git test: add bug439, valid code that caused a gccgo crash R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6198075 --- diff --git a/test/fixedbugs/bug439.go b/test/fixedbugs/bug439.go new file mode 100644 index 0000000000..87d4ae0373 --- /dev/null +++ b/test/fixedbugs/bug439.go @@ -0,0 +1,22 @@ +// 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. + +// Gccgo used to crash compiling this. + +package p + +type E int + +func (e E) P() *E { return &e } + +const ( + C1 E = 0 + C2 = C1 +) + +func F() *E { + return C2.P() +}