blob: ce0345845f9440f2244301d56992eba906b033af [file] [log] [blame]
Emmanuel Odeke53fd5222016-04-10 14:32:26 -07001// Copyright 2013 The Go Authors. All rights reserved.
Russ Coxe5c10502014-05-09 16:03:44 -04002// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package cgotest
6
7import (
8 "testing"
9 "unsafe"
10)
11
12// extern void f7665(void);
13import "C"
14
15//export f7665
16func f7665() {}
17
18var bad7665 unsafe.Pointer = C.f7665
19var good7665 uintptr = uintptr(C.f7665)
20
21func test7665(t *testing.T) {
Ian Lance Taylor6e5ccce82015-10-13 10:05:13 -070022 if bad7665 == nil || uintptr(bad7665) != good7665 {
Russ Coxe5c10502014-05-09 16:03:44 -040023 t.Errorf("ptrs = %p, %#x, want same non-nil pointer", bad7665, good7665)
24 }
25}