mirror of
https://github.com/golang/go
synced 2024-11-19 15:05:00 -07:00
cmd/compile: fix node position for imported constants
Discovered while debugging CL 53644. No test case because these are purely internal conversions that should never end up resulting in compiler warnings or even generated code. Updates #19683. Change-Id: I0d9333ef2c963fa22eb9b5335bb022bcc9b25708 Reviewed-on: https://go-review.googlesource.com/58190 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
84ac90ebf1
commit
b976859b47
@ -932,10 +932,10 @@ func (p *importer) node() *Node {
|
||||
// again. Re-introduce explicit uintptr(c) conversion.
|
||||
// (issue 16317).
|
||||
if typ.IsUnsafePtr() {
|
||||
n = nod(OCONV, n, nil)
|
||||
n = nodl(pos, OCONV, n, nil)
|
||||
n.Type = types.Types[TUINTPTR]
|
||||
}
|
||||
n = nod(OCONV, n, nil)
|
||||
n = nodl(pos, OCONV, n, nil)
|
||||
n.Type = typ
|
||||
}
|
||||
return n
|
||||
|
Loading…
Reference in New Issue
Block a user