1// Copyright 2015 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// This file contains tests for the cgo checker.
6
7package testdata
8
9// void f(void *p) {}
10import "C"
11
12import "unsafe"
13
14func CgoTests() {
15	var c chan bool
16	C.f(*(*unsafe.Pointer)(unsafe.Pointer(&c))) // ERROR "embedded pointer"
17	C.f(unsafe.Pointer(&c))                     // ERROR "embedded pointer"
18}
19