summaryrefslogtreecommitdiff
path: root/testsuite/libffi.closures/cls_4byte.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/libffi.closures/cls_4byte.c')
-rw-r--r--testsuite/libffi.closures/cls_4byte.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/libffi.closures/cls_4byte.c b/testsuite/libffi.closures/cls_4byte.c
index 4ac3787..4f8d173 100644
--- a/testsuite/libffi.closures/cls_4byte.c
+++ b/testsuite/libffi.closures/cls_4byte.c
@@ -24,6 +24,15 @@ cls_struct_4byte cls_struct_4byte_fn(struct cls_struct_4byte a1,
printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
+ CHECK(a1.a == 127);
+ CHECK(a1.b == 120);
+
+ CHECK(a2.a == 12);
+ CHECK(a2.b == 128);
+
+ CHECK(result.a == 139);
+ CHECK(result.b == 248);
+
return result;
}
@@ -78,6 +87,8 @@ int main (void)
/* { dg-output "127 120 12 128: 139 248" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 139 248" } */
+ CHECK(res_dbl.a == 139);
+ CHECK(res_dbl.b == 248);
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_4byte_gn, NULL, code) == FFI_OK);
@@ -85,6 +96,8 @@ int main (void)
/* { dg-output "\n127 120 12 128: 139 248" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 139 248" } */
+ CHECK(res_dbl.a == 139);
+ CHECK(res_dbl.b == 248);
exit(0);
}