diff options
Diffstat (limited to 'ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c')
-rw-r--r-- | ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c b/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c index e769caf..e077f92 100644 --- a/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +++ b/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c @@ -7,7 +7,6 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* } } */ /* { dg-output "" { xfail mips-sgi-irix6* } } PR libffi/46660 */ -/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */ #include "ffitest.h" @@ -37,24 +36,26 @@ int main (void) arg_types[1] = &ffi_type_double; arg_types[2] = NULL; - CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, - arg_types) == FFI_OK); + /* This printf call is variadic */ + CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, &ffi_type_sint, + arg_types) == FFI_OK); args[0] = &format; args[1] = &doubleArg; args[2] = NULL; ffi_call(&cif, FFI_FN(printf), &res, args); - // { dg-output "7.0" } + /* { dg-output "7.0" } */ printf("res: %d\n", (int) res); - // { dg-output "\nres: 4" } + /* { dg-output "\nres: 4" } */ - CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL, code) == FFI_OK); + CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL, + code) == FFI_OK); - res = ((int(*)(char*, double))(code))(format, doubleArg); - // { dg-output "\n7.0" } + res = ((int(*)(char*, ...))(code))(format, doubleArg); + /* { dg-output "\n7.0" } */ printf("res: %d\n", (int) res); - // { dg-output "\nres: 4" } + /* { dg-output "\nres: 4" } */ exit(0); } |