2 Purpose: Check that negative integers are passed correctly.
5 Originator: From the original ffitest.c */
8 /* { dg-options -O2 } */
12 static int checking(int a, short b, signed char c)
16 return (a < 0 && b < 0 && c < 0);
22 ffi_type *args[MAX_ARGS];
23 void *values[MAX_ARGS];
30 args[0] = &ffi_type_sint;
32 args[1] = &ffi_type_sshort;
34 args[2] = &ffi_type_schar;
37 /* Initialize the cif */
38 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3,
39 &ffi_type_sint, args) == FFI_OK);
45 checking (si, ss, sc);
47 ffi_call(&cif, FFI_FN(checking), &rint, values);
49 printf ("%d vs %d\n", (int)rint, checking (si, ss, sc));