From: Ian Lance Taylor Date: Wed, 1 Feb 2012 00:19:25 +0000 (-0800) Subject: test: add test which crashed gccgo compiler X-Git-Tag: weekly.2012-02-07~160 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f6f83e493819675511c09941a075e9637a48b7e9;p=gostls13.git test: add test which crashed gccgo compiler R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5605046 --- diff --git a/test/fixedbugs/bug403.go b/test/fixedbugs/bug403.go new file mode 100644 index 0000000000..ec02ca7333 --- /dev/null +++ b/test/fixedbugs/bug403.go @@ -0,0 +1,23 @@ +// $G $D/$F.go + +// 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. + +// Crashed gccgo. + +package p + +type S struct { + f interface{} +} + +func F(p *S) bool { + v := p.f + switch a := v.(type) { + case nil: + _ = a + return true + } + return true +}