mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-20 00:25:05 +08:00
return_ul.c (main): Define return type as ffi_arg.
* testsuite/libffi.call/return_ul.c (main): Define return type as ffi_arg. Use proper printf conversion specifier. From-SVN: r127177
This commit is contained in:
parent
bcaaa78047
commit
58e11497f7
@ -1,3 +1,8 @@
|
|||||||
|
2007-08-02 David Daney <ddaney@avtrex.com>
|
||||||
|
|
||||||
|
* testsuite/libffi.call/return_ul.c (main): Define return type as
|
||||||
|
ffi_arg. Use proper printf conversion specifier.
|
||||||
|
|
||||||
2007-07-30 Andrew Haley <aph@redhat.com>
|
2007-07-30 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
PR testsuite/32843
|
PR testsuite/32843
|
||||||
|
@ -16,7 +16,7 @@ int main (void)
|
|||||||
ffi_cif cif;
|
ffi_cif cif;
|
||||||
ffi_type *args[MAX_ARGS];
|
ffi_type *args[MAX_ARGS];
|
||||||
void *values[MAX_ARGS];
|
void *values[MAX_ARGS];
|
||||||
unsigned long res;
|
ffi_arg res;
|
||||||
unsigned long ul1, ul2;
|
unsigned long ul1, ul2;
|
||||||
|
|
||||||
args[0] = &ffi_type_ulong;
|
args[0] = &ffi_type_ulong;
|
||||||
@ -31,7 +31,7 @@ int main (void)
|
|||||||
ul2 = 1073741824L;
|
ul2 = 1073741824L;
|
||||||
|
|
||||||
ffi_call(&cif, FFI_FN(return_ul), &res, values);
|
ffi_call(&cif, FFI_FN(return_ul), &res, values);
|
||||||
printf("res: %ld, %ld\n", res, ul1 + ul2);
|
printf("res: %lu, %lu\n", (unsigned long)res, ul1 + ul2);
|
||||||
/* { dg-output "res: 2147483647, 2147483647" } */
|
/* { dg-output "res: 2147483647, 2147483647" } */
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user