issue33061.go 373 B

1234567891011121314151617
  1. // Copyright 2019 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // cgo shouldn't crash if there is an extra argument with a C reference.
  5. package main
  6. // void F(void* p) {};
  7. import "C"
  8. import "unsafe"
  9. func F() {
  10. var i int
  11. C.F(unsafe.Pointer(&i), C.int(0)) // ERROR HERE
  12. }