* tree-vect-loop-manip.c (vect_do_peeling): Do not use
[official-gcc.git] / libgo / misc / cgo / test / issue8148.go
blobf704788aef8a45da1d8d195f8c478ee7d617f3e5
1 // Copyright 2014 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.
5 // Issue 8148. A typedef of an unnamed struct didn't work when used
6 // with an exported Go function. No runtime test; just make sure it
7 // compiles.
9 package cgotest
12 typedef struct { int i; } T;
14 int issue8148Callback(T*);
16 static int get() {
17 T t;
18 t.i = 42;
19 return issue8148Callback(&t);
22 import "C"
24 //export issue8148Callback
25 func issue8148Callback(t *C.T) C.int {
26 return t.i
29 func Issue8148() int {
30 return int(C.get())