Skip to content

Commit

Permalink
cmd/compile: do not emit args_stackmap for func _
Browse files Browse the repository at this point in the history
Fixes #11699.

Change-Id: I01bf506d76260bcdf828bbde52791e328aa441a5
Reviewed-on: https://go-review.googlesource.com/16921
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
rsc committed Nov 16, 2015
1 parent 247959d commit 292ad59
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/compile/internal/gc/pgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ func gcsymdup(s *Sym) {
}

func emitptrargsmap() {
if Curfn.Func.Nname.Sym.Name == "_" {
return
}
sym := Lookup(fmt.Sprintf("%s.args_stackmap", Curfn.Func.Nname.Sym.Name))

nptr := int(Curfn.Type.Argwid / int64(Widthptr))
Expand Down
12 changes: 12 additions & 0 deletions test/fixedbugs/issue11699.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// compile

// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// issue 11699; used to fail with duplicate _.args_stackmap symbols.

package p

func _()
func _()

0 comments on commit 292ad59

Please sign in to comment.