]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: add test that caused gofrontend crash
authorIan Lance Taylor <iant@golang.org>
Wed, 22 Mar 2023 00:28:36 +0000 (17:28 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 22 Mar 2023 18:56:30 +0000 (18:56 +0000)
For #59169

Change-Id: Id72ad9fe8b6e1d7cf64f972520ae8858f70c025a
Reviewed-on: https://go-review.googlesource.com/c/go/+/478217
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

test/fixedbugs/issue59169.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue59169.go b/test/fixedbugs/issue59169.go
new file mode 100644 (file)
index 0000000..61e2a95
--- /dev/null
@@ -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:])
+}