]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: evaluate zero-sized values converted to interfaces
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 23 Feb 2017 05:19:29 +0000 (21:19 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 24 Feb 2017 19:09:41 +0000 (19:09 +0000)
commitd9270ecb3ad35079df62ad85b3a5e52e46e4a1c0
treeeaa14e6662c725ae79e0fa744a56221697560a8b
parentf8ae30c4a201dbdb6652cbb72cd51762863c7447
cmd/compile: evaluate zero-sized values converted to interfaces

CL 35562 substituted zerobase for the pointer for
interfaces containing zero-sized values.
However, it failed to evaluate the zero-sized value
expression for side-effects. Fix that.

The other similar interface value optimizations
are not affected, because they all actually use the
value one way or another.

Fixes #19246

Change-Id: I1168a99561477c63c29751d5cd04cf81b5ea509d
Reviewed-on: https://go-review.googlesource.com/37395
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue19246.go [new file with mode: 0644]