From 835b17c85f62c0e952646ace959510aca6c28568 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 28 Mar 2017 12:41:40 -0700 Subject: [PATCH] test: add test for gccgo compiler crash 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 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- test/fixedbugs/gcc80226.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/fixedbugs/gcc80226.go diff --git a/test/fixedbugs/gcc80226.go b/test/fixedbugs/gcc80226.go new file mode 100644 index 0000000000..530b397f0f --- /dev/null +++ b/test/fixedbugs/gcc80226.go @@ -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{} +} -- 2.48.1