cmd/link: fix loop variable capturing in TestDeadcode
cmd/link: fix loop variable capturing in TestDeadcode

Fixes #38884.

Change-Id: Id5ab9977b6404d0dbf71f13e3e4fefb6868ac802
Reviewed-on: https://go-review.googlesource.com/c/go/+/232377
Run-TryBot: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Reviewed-by: Bryan C. Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

golang/go,CAFxX/go,CAFxX/go,nawawi/go,golang/go,CAFxX/go,golang/go,akutz/go,golang/go,nawawi/go,cloudflare/go,akutz/go,CAFxX/go,nawawi/go,cloudflare/go,nawawi/go,cloudflare/go,akutz/go,akutz/go,akutz/go,CAFxX/go,akutz/go,CAFxX/go,golang/go,nawawi/go,cloudflare/go,CAFxX/go,CAFxX/go,cloudflare/go,nawawi/go,cloudflare/go,cloudflare/go,golang/go,nawawi/go,akutz/go,golang/go,nawawi/go,akutz/go,golang/go,cloudflare/go