diff options
author | Cherry Zhang <cherryyz@google.com> | 2016-11-21 11:31:39 -0500 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2017-02-02 21:28:38 +0000 |
commit | fddc004537b90e46c894e9b22c291759fcd1209e (patch) | |
tree | ec637188d1c78b7bc1eb807300293049a1a57d47 /test/nilptr3.go | |
parent | c1363b2d91d9aa152ef17a68d7a1778426b33727 (diff) | |
download | go-fddc004537b90e46c894e9b22c291759fcd1209e.tar.gz go-fddc004537b90e46c894e9b22c291759fcd1209e.zip |
cmd/compile: remove nil check for Zero/Move on 386, AMD64, S390X
Fixes #18003.
Change-Id: Iadcc5c424c64badecfb5fdbd4dbd9197df56182c
Reviewed-on: https://go-review.googlesource.com/33421
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/nilptr3.go')
-rw-r--r-- | test/nilptr3.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/nilptr3.go b/test/nilptr3.go index c681cba50c..7af226b5f4 100644 --- a/test/nilptr3.go +++ b/test/nilptr3.go @@ -254,3 +254,8 @@ func f7() (*Struct, float64) { p := &t.Y // ERROR "removed nil check" return t, *p // ERROR "removed nil check" } + +// make sure to remove nil check for memory move (issue #18003) +func f8(t *[8]int) [8]int { + return *t // ERROR "removed nil check" +} |