2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2013 The Go Authors. All rights reserved.
|
2013-10-11 12:24:54 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// +build gccgo
|
|
|
|
|
|
|
|
#include "_cgo_export.h"
|
2014-09-16 09:03:11 -06:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2013-10-11 12:24:54 -06:00
|
|
|
|
|
|
|
/* Test calling panic from C. This is what SWIG does. */
|
|
|
|
|
|
|
|
extern void _cgo_panic(const char *);
|
2014-09-16 09:03:11 -06:00
|
|
|
extern void *_cgo_allocate(size_t);
|
2013-10-11 12:24:54 -06:00
|
|
|
|
|
|
|
void
|
|
|
|
callPanic(void)
|
|
|
|
{
|
|
|
|
_cgo_panic("panic from C");
|
|
|
|
}
|