]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test for gccgo compiler crash
authorIan Lance Taylor <iant@golang.org>
Tue, 28 Mar 2017 19:41:40 +0000 (12:41 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 28 Mar 2017 20:05:34 +0000 (20:05 +0000)
Gccgo crashed compiling a function that returned multiple zero-sized values.

Change-Id: I499112cc310e4a4f649962f4d2bc9fee95dee1b6
Reviewed-on: https://go-review.googlesource.com/38772
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

test/fixedbugs/gcc80226.go [new file with mode: 0644]

diff --git a/test/fixedbugs/gcc80226.go b/test/fixedbugs/gcc80226.go
new file mode 100644 (file)
index 0000000..530b397
--- /dev/null
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2017 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.
+
+// The gccgo compiler crashed while compiling a function that returned
+// multiple zero-sized structs.
+// https://gcc.gnu.org/PR80226.
+
+package p
+
+type S struct{}
+
+func F() (S, S) {
+       return S{}, S{}
+}