Commit 034aca1c authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Brad Fitzpatrick

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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d9fc1929
// 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:
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment