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 5// cgo shouldn't crash if there is an extra argument with a C reference. 6 7package main 8 9// void F(void* p) {}; 10import "C" 11 12import "unsafe" 13 14func F() { 15 var i int 16 C.F(unsafe.Pointer(&i), C.int(0)) // ERROR HERE 17} 18