Minor update on https://go-review.googlesource.com/27441 .
Change-Id: I605a8bfbe67e259020aa53f1d2357808197d02b6
Reviewed-on: https://go-review.googlesource.com/27631
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
typ := p.typ()
n := nodlit(p.value(typ))
if !typ.IsUntyped() {
+ // Type-checking simplifies unsafe.Pointer(uintptr(c))
+ // to unsafe.Pointer(c) which then cannot type-checked
+ // again. Re-introduce explicit uintptr(c) conversion.
+ // (issue 16317).
if typ.IsUnsafePtr() {
conv := Nod(OCALL, typenod(Types[TUINTPTR]), nil)
conv.List.Set1(n)