aboutsummaryrefslogtreecommitdiff
path: root/test/escape_map.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2019-08-30 10:56:30 -0700
committerMatthew Dempsky <mdempsky@google.com>2019-09-03 17:52:06 +0000
commit9f89edcd9668bb3b011961fbcdd8fc2796acba5d (patch)
treefac2ea3d67038eff5b913af5cb6b24224c94767f /test/escape_map.go
parenta71967e4c5aa34f274b8b9aff915f14ac00e7ee8 (diff)
downloadgo-9f89edcd9668bb3b011961fbcdd8fc2796acba5d.tar.gz
go-9f89edcd9668bb3b011961fbcdd8fc2796acba5d.zip
cmd/compile: silence esc diagnostics about directiface OCONVIFACEs
In general, a conversion to interface type may require values to be boxed, which in turn necessitates escape analysis to determine whether the boxed representation can be stack allocated. However, esc.go used to unconditionally print escape analysis decisions about OCONVIFACE, even for conversions that don't require boxing (e.g., pointers, channels, maps, functions). For test compatibility with esc.go, escape.go similarly printed these useless diagnostics. This CL removes the diagnostics, and updates test expectations accordingly. Change-Id: I97c57a4a08e44d265bba516c78426ff4f2bf1e12 Reviewed-on: https://go-review.googlesource.com/c/go/+/192697 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'test/escape_map.go')
-rw-r--r--test/escape_map.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/escape_map.go b/test/escape_map.go
index 9912b55a35..0e9896a9fc 100644
--- a/test/escape_map.go
+++ b/test/escape_map.go
@@ -95,7 +95,7 @@ func map8() {
i := 0 // ERROR "moved to heap: i"
j := 0 // ERROR "moved to heap: j"
m := map[*int]*int{&i: &j} // ERROR "literal escapes to heap"
- sink = m // ERROR "m escapes to heap"
+ sink = m
}
func map9() *int {