From b976859b4757eafac39988c9ba72704ff472786f Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Wed, 23 Aug 2017 13:50:47 -0700 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Robert Griesemer --- src/cmd/compile/internal/gc/bimport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/gc/bimport.go b/src/cmd/compile/internal/gc/bimport.go index ba542b4719..c066dea960 100644 --- a/src/cmd/compile/internal/gc/bimport.go +++ b/src/cmd/compile/internal/gc/bimport.go @@ -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 -- 2.48.1