]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix node position for imported constants
authorMatthew Dempsky <mdempsky@google.com>
Wed, 23 Aug 2017 20:50:47 +0000 (13:50 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 25 Aug 2017 08:12:20 +0000 (08:12 +0000)
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>
src/cmd/compile/internal/gc/bimport.go

index ba542b4719efead1403602f9dbe9661300bfd169..c066dea96058e188777d174b28d7afe2c563b9cd 100644 (file)
@@ -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