From: Ian Lance Taylor Date: Wed, 22 Mar 2023 00:28:36 +0000 (-0700) Subject: test: add test that caused gofrontend crash X-Git-Tag: go1.21rc1~1184 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=09e9a9eac9f3d347e3a204ae3ca309b5340028c4;p=gostls13.git 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 --- 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:]) +}