From: Ian Lance Taylor Date: Tue, 28 Mar 2017 19:41:40 +0000 (-0700) Subject: test: add test for gccgo compiler crash X-Git-Tag: go1.9beta1~947 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=835b17c85f62c0e952646ace959510aca6c28568;p=gostls13.git 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 --- 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{} +}