summaryrefslogtreecommitdiff
path: root/gcc/testsuite/go.go-torture/execute/chan-1.go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/go.go-torture/execute/chan-1.go')
-rw-r--r--gcc/testsuite/go.go-torture/execute/chan-1.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/go.go-torture/execute/chan-1.go b/gcc/testsuite/go.go-torture/execute/chan-1.go
new file mode 100644
index 000000000..c3d4ddb11
--- /dev/null
+++ b/gcc/testsuite/go.go-torture/execute/chan-1.go
@@ -0,0 +1,7 @@
+package main
+
+func main() {
+ c := make(chan int, 1);
+ c <- 0;
+ if <-c != 0 { panic(0) }
+}