]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.11] 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)
committerAndrew Bonventre <andybons@golang.org>
Tue, 11 Sep 2018 16:37:03 +0000 (16:37 +0000)
commit5a25f45bce6914599da1de2b10afcc7792bc6804
treea60c17452ec8cb2962a9d11a7d6e0e3b6592c999
parenteeaf877114a2f60dfae7b5c5411ab884ba2a4757
[release-branch.go1.11] 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 #27342.

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>
(cherry picked from commit 54f9c0416a588963cb5a1c10ffb6a88f3956858c)
Reviewed-on: https://go-review.googlesource.com/134615
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/deadstore.go
test/fixedbugs/issue27278.go [new file with mode: 0644]