aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ir/node.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2021-03-14 14:24:47 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2021-04-21 00:53:48 +0000
commitfaa4fa1a6e94fce4f6fa22524a2bece5125213b6 (patch)
treeecd5c4b860564b5b1926725f6ffafcebfac3b3d9 /src/cmd/compile/internal/ir/node.go
parent1c268431f49ee2fc843eac52a0854aea3d02a6e0 (diff)
downloadgo-faa4fa1a6e94fce4f6fa22524a2bece5125213b6.tar.gz
go-faa4fa1a6e94fce4f6fa22524a2bece5125213b6.zip
cmd/compile: allow conversion from slice to array ptr
Panic if the slice is too short. Updates #395 Change-Id: I90f4bff2da5d8f3148ba06d2482084f32b25c29a Reviewed-on: https://go-review.googlesource.com/c/go/+/301650 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ir/node.go')
-rw-r--r--src/cmd/compile/internal/ir/node.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ir/node.go b/src/cmd/compile/internal/ir/node.go
index b6be74296ff..b4db79e5c29 100644
--- a/src/cmd/compile/internal/ir/node.go
+++ b/src/cmd/compile/internal/ir/node.go
@@ -137,6 +137,7 @@ const (
OSTR2BYTES // Type(Left) (Type is []byte, Left is a string)
OSTR2BYTESTMP // Type(Left) (Type is []byte, Left is a string, ephemeral)
OSTR2RUNES // Type(Left) (Type is []rune, Left is a string)
+ OSLICE2ARRPTR // Type(Left) (Type is *[N]T, Left is a []T)
// Left = Right or (if Colas=true) Left := Right
// If Colas, then Ninit includes a DCL node for Left.
OAS