Fix a bug in cfg fixup
[official-gcc.git] / libffi / testsuite / libffi.call / err_bad_typedef.c
blobbd2fc54a0e816b4b3b21b25ce146ed9218c7882b
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 */
7 /* { dg-do run { xfail *-*-* } } */
8 #include "ffitest.h"
10 int main (void)
12 ffi_cif cif;
13 ffi_type* arg_types[1];
15 arg_types[0] = NULL;
17 ffi_type badType = ffi_type_void;
19 badType.size = 0;
21 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &badType,
22 arg_types) == FFI_BAD_TYPEDEF);
24 exit(0);