summaryrefslogtreecommitdiff
path: root/testsuite/libffi.closures/cls_align_pointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/libffi.closures/cls_align_pointer.c')
-rw-r--r--testsuite/libffi.closures/cls_align_pointer.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/libffi.closures/cls_align_pointer.c b/testsuite/libffi.closures/cls_align_pointer.c
index ef59259..5fb3f09 100644
--- a/testsuite/libffi.closures/cls_align_pointer.c
+++ b/testsuite/libffi.closures/cls_align_pointer.c
@@ -28,6 +28,18 @@ static cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
result.a, (uintptr_t)result.b,
result.c);
+ CHECK(a1.a == 12);
+ CHECK(a1.b == (void *)4951);
+ CHECK(a1.c == 127);
+
+ CHECK(a2.a == 1);
+ CHECK(a2.b == (void *)9320);
+ CHECK(a2.c == 13);
+
+ CHECK(result.a == 13);
+ CHECK(result.b == (void *)14271);
+ CHECK(result.c == 140);
+
return result;
}
@@ -83,6 +95,9 @@ int main (void)
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIuPTR " %d\n", res_dbl.a, (uintptr_t)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
+ CHECK(res_dbl.a == 13);
+ CHECK(res_dbl.b == (void *)14271);
+ CHECK(res_dbl.c == 140);
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
@@ -90,6 +105,9 @@ int main (void)
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIuPTR " %d\n", res_dbl.a, (uintptr_t)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
+ CHECK(res_dbl.a == 13);
+ CHECK(res_dbl.b == (void *)14271);
+ CHECK(res_dbl.c == 140);
exit(0);
}