ada: Remove redundant line in Analyze_Qualified_Expression
[official-gcc.git] / libgo / misc / cgo / test / callback_c_gc.c
blobeb720eba7c469afe32a1580ee8dd1e672767a5e7
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.
5 // +build gc
7 #include "_cgo_export.h"
8 #include <stdint.h>
9 #include <stdio.h>
10 #include <stdlib.h>
12 /* Test calling panic from C. This is what SWIG does. */
14 extern void crosscall2(void (*fn)(void *, int), void *, int);
15 extern void _cgo_panic(void *, int);
16 extern void _cgo_allocate(void *, int);
18 void
19 callPanic(void)
21 struct { const char *p; } a;
22 a.p = "panic from C";
23 crosscall2(_cgo_panic, &a, sizeof a);
24 *(int*)1 = 1;