1 /* Area: ffi_call, unwind info
2 Purpose: Check if the unwind information is passed correctly.
5 Originator: Andreas Tobler <andreast@gcc.gnu.org> 20061213 */
8 #include "ffitestcxx.h"
10 static int checking(int a __UNUSED__
, short b __UNUSED__
,
11 signed char c __UNUSED__
)
19 ffi_type
*args
[MAX_ARGS
];
20 void *values
[MAX_ARGS
];
27 args
[0] = &ffi_type_sint
;
29 args
[1] = &ffi_type_sshort
;
31 args
[2] = &ffi_type_schar
;
34 /* Initialize the cif */
35 CHECK(ffi_prep_cif(&cif
, FFI_DEFAULT_ABI
, 3,
36 &ffi_type_sint
, args
) == FFI_OK
);
44 ffi_call(&cif
, FFI_FN(checking
), &rint
, values
);
45 } catch (int exception_code
)
47 CHECK(exception_code
== 9);
49 printf("part one OK\n");
50 /* { dg-output "part one OK" } */