]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test that caused gccgo crash
authorIan Lance Taylor <iant@golang.org>
Sat, 16 Jul 2022 01:41:41 +0000 (18:41 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 19 Aug 2022 03:32:27 +0000 (03:32 +0000)
For #23870

Change-Id: I3bbe0f751254d1354a59a88b45e6f944c7a2fb4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/417874
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
test/fixedbugs/issue23870.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue23870.go b/test/fixedbugs/issue23870.go
new file mode 100644 (file)
index 0000000..02aa294
--- /dev/null
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2022 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.
+
+// Crashed gccgo.
+
+package p
+
+var F func() [0]struct{
+       A int
+}
+
+var i int
+var V = (F()[i]).A