From: Ian Lance Taylor Date: Sat, 16 Jul 2022 01:41:41 +0000 (-0700) Subject: test: add test that caused gccgo crash X-Git-Tag: go1.20rc1~1526 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6001c043dc067b7f6b9a2e934439b6a7948f92ef;p=gostls13.git test: add test that caused gccgo crash For #23870 Change-Id: I3bbe0f751254d1354a59a88b45e6f944c7a2fb4d Reviewed-on: https://go-review.googlesource.com/c/go/+/417874 TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Run-TryBot: Ian Lance Taylor Reviewed-by: Than McIntosh --- diff --git a/test/fixedbugs/issue23870.go b/test/fixedbugs/issue23870.go new file mode 100644 index 0000000000..02aa2949c3 --- /dev/null +++ b/test/fixedbugs/issue23870.go @@ -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