From: Ian Lance Taylor Date: Tue, 28 Mar 2023 19:51:35 +0000 (-0700) Subject: test: add test that caused a gofrontend crash X-Git-Tag: go1.21rc1~1123 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a6f564c8e97ddf9c523d363d4cd87db613f90029;p=gostls13.git test: add test that caused a gofrontend crash For #55242 Change-Id: I092b1881623ea997b178d038c0afd10cd5bca937 Reviewed-on: https://go-review.googlesource.com/c/go/+/479898 Reviewed-by: Than McIntosh Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Matthew Dempsky TryBot-Result: Gopher Robot --- diff --git a/test/fixedbugs/issue55242.go b/test/fixedbugs/issue55242.go new file mode 100644 index 0000000000..4b29eb815c --- /dev/null +++ b/test/fixedbugs/issue55242.go @@ -0,0 +1,18 @@ +// compile + +// Copyright 2023 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. + +// Issue 55242: gofrontend crash calling function that returns +// trailing empty struct. + +package p + +func F1() (int, struct{}) { + return 0, struct{}{} +} + +func F2() { + F1() +}