aboutsummaryrefslogtreecommitdiff
path: root/test/prove.go
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2019-09-30 11:12:29 -0400
committerDavid Chase <drchase@google.com>2019-10-03 21:12:13 +0000
commitadc4d2cc2dbc20c14bae7bbdbca8d75421e1bef5 (patch)
treef859739b569fd3682291b60186cd41d55e85f229 /test/prove.go
parent08a87938bb95ae8859600be20a998fbb4b904915 (diff)
downloadgo-adc4d2cc2dbc20c14bae7bbdbca8d75421e1bef5.tar.gz
go-adc4d2cc2dbc20c14bae7bbdbca8d75421e1bef5.zip
cmd/compile: run deadcode before nilcheck for better statement relocation
Nilcheck would move statements from NilCheck values to others that turned out were already dead, which leads to lost statements. Better to eliminate the dead code first. One "error" is removed from test/prove.go because the code is actually dead, and the additional deadcode pass removes it before prove can run. Change-Id: If75926ca1acbb59c7ab9c8ef14d60a02a0a94f8b Reviewed-on: https://go-review.googlesource.com/c/go/+/198479 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'test/prove.go')
-rw-r--r--test/prove.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/prove.go b/test/prove.go
index 6629982ba8..00fc94e721 100644
--- a/test/prove.go
+++ b/test/prove.go
@@ -507,7 +507,7 @@ func sm1(b []int, x int) {
useSlice(b[2:8]) // ERROR "Proved slicemask not needed$"
// Test non-constant argument with known limits.
if cap(b) > 10 {
- useSlice(b[2:]) // ERROR "Proved slicemask not needed$"
+ useSlice(b[2:])
}
}