[go] test: add test that caused a gofrontend crash

1 view
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Mar 28, 2023, 4:27:19 PM3/28/23
to Ian Lance Taylor, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Matthew Dempsky, Than McIntosh, Cherry Mui, golang-co...@googlegroups.com

Gopher Robot submitted this change.

View Change

Approvals: Than McIntosh: Looks good to me, approved Ian Lance Taylor: Run TryBots; Automatically submit change Matthew Dempsky: Looks good to me, approved Gopher Robot: TryBots succeeded
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 <th...@google.com>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
Run-TryBot: Ian Lance Taylor <ia...@golang.org>
Reviewed-by: Matthew Dempsky <mdem...@google.com>
TryBot-Result: Gopher Robot <go...@golang.org>
---
A test/fixedbugs/issue55242.go
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/test/fixedbugs/issue55242.go b/test/fixedbugs/issue55242.go
new file mode 100644
index 0000000..4b29eb8
--- /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()
+}

To view, visit change 479898. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I092b1881623ea997b178d038c0afd10cd5bca937
Gerrit-Change-Number: 479898
Gerrit-PatchSet: 2
Gerrit-Owner: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Matthew Dempsky <mdem...@google.com>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages