summaryrefslogtreecommitdiff
path: root/testsuite/libffi.closures/cls_8byte.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/libffi.closures/cls_8byte.c')
-rw-r--r--testsuite/libffi.closures/cls_8byte.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/libffi.closures/cls_8byte.c b/testsuite/libffi.closures/cls_8byte.c
index f6c1ea5..7a519e9 100644
--- a/testsuite/libffi.closures/cls_8byte.c
+++ b/testsuite/libffi.closures/cls_8byte.c
@@ -23,6 +23,15 @@ cls_struct_8byte cls_struct_8byte_fn(struct cls_struct_8byte a1,
printf("%d %g %d %g: %d %g\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
+ CHECK(a1.a == 1);
+ CHECK_FLOAT_EQ(a1.b, 2);
+
+ CHECK(a2.a == 4);
+ CHECK_FLOAT_EQ(a2.b, 5);
+
+ CHECK(result.a == 5);
+ CHECK_FLOAT_EQ(result.b, 7);
+
return result;
}
@@ -76,6 +85,9 @@ int main (void)
ffi_call(&cif, FFI_FN(cls_struct_8byte_fn), &res_dbl, args_dbl);
/* { dg-output "1 2 4 5: 5 7" } */
printf("res: %d %g\n", res_dbl.a, res_dbl.b);
+ CHECK(res_dbl.a == 5);
+ CHECK_FLOAT_EQ(res_dbl.b, 7);
+
/* { dg-output "\nres: 5 7" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_8byte_gn, NULL, code) == FFI_OK);
@@ -83,6 +95,8 @@ int main (void)
/* { dg-output "\n1 2 4 5: 5 7" } */
printf("res: %d %g\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 5 7" } */
+ CHECK(res_dbl.a == 5);
+ CHECK_FLOAT_EQ(res_dbl.b, 7);
exit(0);
}