• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /macosx-10.9.5/pyobjc-42/2.5/pyobjc/pyobjc-core/libffi-src/tests/testsuite/libffi.call/
1/* Area:		ffi_prep_cif
2   Purpose:		Test error return for bad typedefs.
3   Limitations:	none.
4   PR:			none.
5   Originator:	Blake Chaffin 6/6/2007	 */
6
7/* { dg-do run { xfail mips*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
8#include "ffitest.h"
9
10int main (void)
11{
12	ffi_cif cif;
13#ifndef USING_MMAP
14	static ffi_closure cl;
15#endif
16	ffi_closure *pcl;
17	ffi_type* arg_types[1];
18
19#ifdef USING_MMAP
20	pcl = allocate_mmap (sizeof(ffi_closure));
21#else
22	pcl = &cl;
23#endif
24
25	arg_types[0] = NULL;
26
27	ffi_type	badType	= ffi_type_void;
28
29	badType.size = 0;
30
31	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &badType,
32		arg_types) == FFI_BAD_TYPEDEF);
33
34	exit(0);
35}
36