summaryrefslogtreecommitdiff
path: root/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c')
-rw-r--r--ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c b/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c
index 07780ed..39b438b 100644
--- a/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c
+++ b/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c
@@ -7,7 +7,6 @@
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */
/* { 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_longdouble;
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] = &ldArg;
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_longdouble_va_fn, NULL, code) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, cls_longdouble_va_fn, NULL,
+ code) == FFI_OK);
- res = ((int(*)(char*, long double))(code))(format, ldArg);
- // { dg-output "\n7.0" }
+ res = ((int(*)(char*, ...))(code))(format, ldArg);
+ /* { dg-output "\n7.0" } */
printf("res: %d\n", (int) res);
- // { dg-output "\nres: 4" }
+ /* { dg-output "\nres: 4" } */
exit(0);
}