Source file src/cmd/cgo/internal/testerrors/testdata/issue33061.go

     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  
     7  package main
     8  
     9  // void F(void* p) {};
    10  import "C"
    11  
    12  import "unsafe"
    13  
    14  func F() {
    15  	var i int
    16  	C.F(unsafe.Pointer(&i), C.int(0)) // ERROR HERE
    17  }
    18  

View as plain text