The powerpc64 support opted to pass floating point values both in the
[platform/upstream/libffi.git] / testsuite / libffi.call / cls_longdouble_va.c
index 7126b13..39b438b 100644 (file)
@@ -38,7 +38,7 @@ int main (void)
 
        /* This printf call is variadic */
        CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, &ffi_type_sint,
-               arg_types) == FFI_OK);
+                              arg_types) == FFI_OK);
 
        args[0] = &format;
        args[1] = &ldArg;
@@ -49,13 +49,10 @@ int main (void)
        printf("res: %d\n", (int) res);
        /* { dg-output "\nres: 4" } */
 
-       /* The call to cls_longdouble_va_fn is static, so have to use a normal prep_cif */
-       CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint,
-               arg_types) == FFI_OK);
+       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);
+       res = ((int(*)(char*, ...))(code))(format, ldArg);
        /* { dg-output "\n7.0" } */
        printf("res: %d\n", (int) res);
        /* { dg-output "\nres: 4" } */