1 /* Area: ffi_prep_cif, ffi_prep_closure
2 Purpose: Test error return for bad ABIs.
5 Originator: Blake Chaffin 6/6/2007 */
7 /* { dg-do run { xfail *-*-* } } */
11 dummy_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
12 void** args __UNUSED__, void* userdata __UNUSED__)
19 ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
20 ffi_type* arg_types[1];
24 CHECK(ffi_prep_cif(&cif, 255, 0, &ffi_type_void,
25 arg_types) == FFI_BAD_ABI);
27 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &ffi_type_void,
28 arg_types) == FFI_OK);
32 CHECK(ffi_prep_closure_loc(pcl, &cif, dummy_fn, NULL, code) == FFI_BAD_ABI);