mirror of
https://github.com/golang/go
synced 2024-09-23 23:20:14 -06:00
misc/cgo/test: avoid duplicate definition with gccgo
Current versions of gccgo issue a duplicate definition error when both a definition and an empty declaration occur. Use build tags to avoid that case for the issue9400 subdirectory. Change-Id: I18517af87bab05e9ca43f2f295459cf34347c317 Reviewed-on: https://go-review.googlesource.com/119896 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
65d55a13a9
commit
29673a4be6
@ -16,6 +16,8 @@ import (
|
||||
// without writing more assembly code, which we haven't bothered to
|
||||
// do. So this is not much of a test.
|
||||
|
||||
var Baton int32
|
||||
|
||||
func RewindAndSetgid() {
|
||||
atomic.StoreInt32(&Baton, 1)
|
||||
for atomic.LoadInt32(&Baton) != 0 {
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build gc
|
||||
|
||||
package issue9400
|
||||
|
||||
var Baton int32
|
||||
|
Loading…
Reference in New Issue
Block a user