compiler: don't use address of temporary for deferred delete

This CL corrects the handling of a deferred delete in a loop, to not
use a temporary whose value will, at deferred execution time, wind up
being the last value in the loop.

The test for this is TestDeferDeleteSlow in the 1.11 runtime package.

Change-Id: I55cbc5e755d7543f119773e50df4696eed5fa982
Reviewed-on: https://go-review.googlesource.com/135358
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2 files changed