From 011a525b21c77c8a11e54c5b15cb10761baf1925 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 13 Jul 2022 18:31:30 -0700 Subject: [PATCH] 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 TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Reviewed-by: Than McIntosh Reviewed-by: Benny Siegert --- test/fixedbugs/issue23868.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/fixedbugs/issue23868.go diff --git a/test/fixedbugs/issue23868.go b/test/fixedbugs/issue23868.go new file mode 100644 index 0000000000..af15c5fb39 --- /dev/null +++ b/test/fixedbugs/issue23868.go @@ -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())) -- 2.50.0