Commit b976859b authored by Matthew Dempsky's avatar Matthew Dempsky

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: default avatarRobert Griesemer <gri@golang.org>
parent 84ac90eb
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment