aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-08-20 11:35:31 -0700
committerIan Lance Taylor <iant@golang.org>2021-08-25 03:13:06 +0000
commite1fcf8857e1b3e076cc3a6fad1860afe0d6c2ca6 (patch)
tree10e959ec9ec3833af630065ed03f7182c002b08b /test
parentd37b8dedf7f96d88c7280f6afadb09b100380f93 (diff)
downloadgo-e1fcf8857e1b3e076cc3a6fad1860afe0d6c2ca6.tar.gz
go-e1fcf8857e1b3e076cc3a6fad1860afe0d6c2ca6.zip
test: add test that caused gofrontend compiler crash
Updates https://gcc.gnu.org/PR101994 Change-Id: I50dcb90e315792efd7d83b496034ad33b5f199e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/343874 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/gcc101994.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/fixedbugs/gcc101994.go b/test/fixedbugs/gcc101994.go
new file mode 100644
index 0000000000..6e1e2b8075
--- /dev/null
+++ b/test/fixedbugs/gcc101994.go
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2021 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.
+
+// https://gcc.gnu.org/PR101994
+// gccgo compiler crash with zero-sized result.
+
+package p
+
+type Empty struct{}
+
+func F() (int, Empty) {
+ return 0, Empty{}
+}