You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Compile the following code snippet with cgo:
package main
// static int f() {
// return 1;
// }
import "C"
func main() {
_, _ = C.f()
_, _ = C.f()
}
What is the expected output?
File test.cgo1.go should read:
// Created by cgo - DO NOT EDIT
//line test.go:1
package main
func main() {
_, _ = _C2func_f()
_, _ = _C2func_f()
}
What do you see instead?
In the generated file, the second call to f() does not invoke the expected function:
// Created by cgo - DO NOT EDIT
//line test.go:1
package main
func main() {
_, _ = _C2func_f()
_, _ = _Cfunc_f()
}
What is your $GOOS? $GOARCH?
GOOS=linux
GOARCH=amd64
Which revision are you using? (hg identify)
46409b5999ae tip