comparison libgo/misc/cgo/test/issue7665.go @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // Copyright 2013 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 package cgotest
6
7 import (
8 "testing"
9 "unsafe"
10 )
11
12 // extern void f7665(void);
13 import "C"
14
15 //export f7665
16 func f7665() {}
17
18 var bad7665 unsafe.Pointer = C.f7665
19 var good7665 uintptr = uintptr(C.f7665)
20
21 func test7665(t *testing.T) {
22 if bad7665 == nil || uintptr(bad7665) != good7665 {
23 t.Errorf("ptrs = %p, %#x, want same non-nil pointer", bad7665, good7665)
24 }
25 }