]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: count nil check as use in dead auto elim
authorCherry Zhang <cherryyz@google.com>
Tue, 28 Aug 2018 18:52:30 +0000 (14:52 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 30 Aug 2018 02:19:37 +0000 (02:19 +0000)
commit54f9c0416a588963cb5a1c10ffb6a88f3956858c
tree32aa24296d9e250924ad08b6bdb134d816126114
parentf9a4ae018d99c5afb0e4f128545ff26e01d7b498
cmd/compile: count nil check as use in dead auto elim

Nil check is special in that it has no use but we must keep it.
Count it as a use of the auto.

Fixes #27278.

Change-Id: I857c3d0db2ebdca1bc342b4993c0dac5c01e067f
Reviewed-on: https://go-review.googlesource.com/131955
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/deadstore.go
test/fixedbugs/issue27278.go [new file with mode: 0644]