summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-08 18:32:16 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-08 18:32:16 +0000
commited0ed2e9016c6f839785c479546d8d342e31a632 (patch)
tree6d391a6b55159e70fee7fa8b28cbea674757c1e2 /libffi
parent14f1f66f64d43bb15064761b9cb09653c7fb4ed2 (diff)
downloadgcc-ed0ed2e9016c6f839785c479546d8d342e31a632.tar.gz
2003-11-08 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/cls_double.c: Do a check on the result. * testsuite/libffi.call/cls_uchar.c: Likewise. * testsuite/libffi.call/cls_uint.c: Likewise. * testsuite/libffi.call/cls_ulonglong.c: Likewise. * testsuite/libffi.call/cls_ushort.c: Likewise. * testsuite/libffi.call/return_sc.c: Cleanup whitespaces. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog9
-rw-r--r--libffi/testsuite/libffi.call/cls_double.c5
-rw-r--r--libffi/testsuite/libffi.call/cls_uchar.c6
-rw-r--r--libffi/testsuite/libffi.call/cls_uint.c6
-rw-r--r--libffi/testsuite/libffi.call/cls_ulonglong.c8
-rw-r--r--libffi/testsuite/libffi.call/cls_ushort.c6
-rw-r--r--libffi/testsuite/libffi.call/return_sc.c8
7 files changed, 30 insertions, 18 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 1a472aa7954..8546b9a3555 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,12 @@
+2003-11-08 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * testsuite/libffi.call/cls_double.c: Do a check on the result.
+ * testsuite/libffi.call/cls_uchar.c: Likewise.
+ * testsuite/libffi.call/cls_uint.c: Likewise.
+ * testsuite/libffi.call/cls_ulonglong.c: Likewise.
+ * testsuite/libffi.call/cls_ushort.c: Likewise.
+ * testsuite/libffi.call/return_sc.c: Cleanup whitespaces.
+
2003-11-06 Andreas Tobler <a.tobler@schweiz.ch>
* src/prep_cif.c (ffi_prep_cif): Move the validity check after
diff --git a/libffi/testsuite/libffi.call/cls_double.c b/libffi/testsuite/libffi.call/cls_double.c
index 76a1df7a340..2bfc6432f2f 100644
--- a/libffi/testsuite/libffi.call/cls_double.c
+++ b/libffi/testsuite/libffi.call/cls_double.c
@@ -23,7 +23,7 @@ int main (void)
static ffi_closure cl;
ffi_closure *pcl = &cl;
ffi_type * cl_arg_types[2];
-
+ double res;
cl_arg_types[0] = &ffi_type_double;
cl_arg_types[1] = NULL;
@@ -34,7 +34,8 @@ int main (void)
CHECK(ffi_prep_closure(pcl, &cif, cls_ret_double_fn, NULL) == FFI_OK);
- (*((cls_ret_double)pcl))(21474.789);
+ res = (*((cls_ret_double)pcl))(21474.789);
/* { dg-output "21474.789000: 21474.789000" } */
+ CHECK(res == 21474.789000);
exit(0);
}
diff --git a/libffi/testsuite/libffi.call/cls_uchar.c b/libffi/testsuite/libffi.call/cls_uchar.c
index 28fb1e3c232..dfa4d97a9b9 100644
--- a/libffi/testsuite/libffi.call/cls_uchar.c
+++ b/libffi/testsuite/libffi.call/cls_uchar.c
@@ -22,7 +22,7 @@ int main (void)
static ffi_closure cl;
ffi_closure *pcl = &cl;
ffi_type * cl_arg_types[2];
-
+ unsigned char res;
cl_arg_types[0] = &ffi_type_uchar;
cl_arg_types[1] = NULL;
@@ -33,8 +33,8 @@ int main (void)
CHECK(ffi_prep_closure(pcl, &cif, cls_ret_uchar_fn, NULL) == FFI_OK);
- (*((cls_ret_uchar)pcl))(127);
+ res = (*((cls_ret_uchar)pcl))(127);
/* { dg-output "127: 127" } */
-
+ CHECK(res == 127);
exit(0);
}
diff --git a/libffi/testsuite/libffi.call/cls_uint.c b/libffi/testsuite/libffi.call/cls_uint.c
index f0977ab2308..684002217ce 100644
--- a/libffi/testsuite/libffi.call/cls_uint.c
+++ b/libffi/testsuite/libffi.call/cls_uint.c
@@ -23,7 +23,7 @@ int main (void)
static ffi_closure cl;
ffi_closure *pcl = &cl;
ffi_type * cl_arg_types[2];
-
+ unsigned int res;
cl_arg_types[0] = &ffi_type_uint32;
cl_arg_types[1] = NULL;
@@ -34,8 +34,8 @@ int main (void)
CHECK(ffi_prep_closure(pcl, &cif, cls_ret_uint_fn, NULL) == FFI_OK);
- (*((cls_ret_uint)pcl))(2147483647);
+ res = (*((cls_ret_uint)pcl))(2147483647);
/* { dg-output "2147483647: 2147483647" } */
-
+ CHECK(res == 2147483647);
exit(0);
}
diff --git a/libffi/testsuite/libffi.call/cls_ulonglong.c b/libffi/testsuite/libffi.call/cls_ulonglong.c
index 7c98d757fd0..8d1a74d7705 100644
--- a/libffi/testsuite/libffi.call/cls_ulonglong.c
+++ b/libffi/testsuite/libffi.call/cls_ulonglong.c
@@ -23,6 +23,7 @@ int main (void)
static ffi_closure cl;
ffi_closure *pcl = &cl;
ffi_type * cl_arg_types[2];
+ unsigned long long res;
cl_arg_types[0] = &ffi_type_uint64;
cl_arg_types[1] = NULL;
@@ -31,10 +32,11 @@ int main (void)
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
&ffi_type_uint64, cl_arg_types) == FFI_OK);
CHECK(ffi_prep_closure(pcl, &cif, cls_ret_ulonglong_fn, NULL) == FFI_OK);
- (*((cls_ret_ulonglong)pcl))(214LL);
+ res = (*((cls_ret_ulonglong)pcl))(214LL);
/* { dg-output "214: 214" } */
- (*((cls_ret_ulonglong)pcl))(9223372035854775808LL);
+ CHECK(res == 214LL);
+ res = (*((cls_ret_ulonglong)pcl))(9223372035854775808LL);
/* { dg-output "\n9223372035854775808: 9223372035854775808" } */
-
+ CHECK(res == 9223372035854775808LL);
exit(0);
}
diff --git a/libffi/testsuite/libffi.call/cls_ushort.c b/libffi/testsuite/libffi.call/cls_ushort.c
index e3acc1529aa..401ff77be72 100644
--- a/libffi/testsuite/libffi.call/cls_ushort.c
+++ b/libffi/testsuite/libffi.call/cls_ushort.c
@@ -23,7 +23,7 @@ int main (void)
static ffi_closure cl;
ffi_closure *pcl = &cl;
ffi_type * cl_arg_types[2];
-
+ unsigned short res;
cl_arg_types[0] = &ffi_type_ushort;
cl_arg_types[1] = NULL;
@@ -34,8 +34,8 @@ int main (void)
CHECK(ffi_prep_closure(pcl, &cif, cls_ret_ushort_fn, NULL) == FFI_OK);
- (*((cls_ret_ushort)pcl))(65535);
+ res = (*((cls_ret_ushort)pcl))(65535);
/* { dg-output "65535: 65535" } */
-
+ CHECK(res == 65535);
exit(0);
}
diff --git a/libffi/testsuite/libffi.call/return_sc.c b/libffi/testsuite/libffi.call/return_sc.c
index 6f91ff6b4c5..e528a8467b0 100644
--- a/libffi/testsuite/libffi.call/return_sc.c
+++ b/libffi/testsuite/libffi.call/return_sc.c
@@ -22,12 +22,12 @@ int main (void)
args[0] = &ffi_type_schar;
values[0] = &sc;
-
+
/* Initialize the cif */
- CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
&ffi_type_schar, args) == FFI_OK);
-
- for (sc = (signed char) -127;
+
+ for (sc = (signed char) -127;
sc < (signed char) 127; sc++)
{
ul++;