From: Ian Lance Taylor Date: Fri, 2 Feb 2018 19:16:56 +0000 (-0800) Subject: test: add a test that gccgo miscompiled X-Git-Tag: go1.11beta1~1631 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=034aca1cbb4ff77c5cb9c49734ecd68d08b53888;p=gostls13.git test: add a test that gccgo miscompiled Updates #20923 Change-Id: Ia1210ea3dec39e5db2521aeafca24d6e731f0c93 Reviewed-on: https://go-review.googlesource.com/91657 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/test/fixedbugs/issue20923.go b/test/fixedbugs/issue20923.go new file mode 100644 index 0000000000..5fd1ad8a46 --- /dev/null +++ b/test/fixedbugs/issue20923.go @@ -0,0 +1,19 @@ +// compile + +// Copyright 2018 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. + +// Issue 20923: gccgo failed to compile parenthesized select case expressions. + +package p + +func F(c chan bool) { + select { + case (<-c): + case _ = (<-c): + case _, _ = (<-c): + case (c) <- true: + default: + } +}