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 */
9 #include "ffitestcxx.h"
11 static int checking(int a __UNUSED__, short b __UNUSED__,
12 signed char c __UNUSED__)
20 ffi_type *args[MAX_ARGS];
21 void *values[MAX_ARGS];
28 args[0] = &ffi_type_sint;
30 args[1] = &ffi_type_sshort;
32 args[2] = &ffi_type_schar;
35 /* Initialize the cif */
36 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3,
37 &ffi_type_sint, args) == FFI_OK);
45 ffi_call(&cif, FFI_FN(checking), &rint, values);
46 } catch (int exception_code)
48 CHECK(exception_code == 9);
50 printf("part one OK\n");
51 /* { dg-output "part one OK" } */