From 09e9a9eac9f3d347e3a204ae3ca309b5340028c4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 21 Mar 2023 17:28:36 -0700 Subject: [PATCH] test: add test that caused gofrontend crash For #59169 Change-Id: Id72ad9fe8b6e1d7cf64f972520ae8858f70c025a Reviewed-on: https://go-review.googlesource.com/c/go/+/478217 TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Run-TryBot: Ian Lance Taylor Reviewed-by: Heschi Kreinick Auto-Submit: Ian Lance Taylor --- test/fixedbugs/issue59169.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/fixedbugs/issue59169.go diff --git a/test/fixedbugs/issue59169.go b/test/fixedbugs/issue59169.go new file mode 100644 index 0000000000..61e2a95d10 --- /dev/null +++ b/test/fixedbugs/issue59169.go @@ -0,0 +1,13 @@ +// 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 59169: caused gofrontend crash. + +package p + +func F(p *[]byte) { + *(*[1]byte)(*p) = *(*[1]byte)((*p)[1:]) +} -- 2.50.0