OSDN Git Service

2003-11-08 Andreas Tobler <a.tobler@schweiz.ch>
[pf3gnuchains/gcc-fork.git] / libffi / testsuite / libffi.call / cls_ulonglong.c
index 7c98d75..8d1a74d 100644 (file)
@@ -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);
 }