test: add test that caused gccgo to crash

For #23868

Change-Id: I07b001836e8d1411609ab84786398a5b575bf8d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/417481
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
This commit is contained in:
Ian Lance Taylor 2022-07-13 18:31:30 -07:00
parent a409356c54
commit 011a525b21

View File

@ -0,0 +1,14 @@
// 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]int) int
var G func() [0]int
var V = make([]int, F(G()))