diff options
author | doko <doko@ubuntu.com> | 2017-01-31 13:35:56 +0100 |
---|---|---|
committer | doko <doko@ubuntu.com> | 2017-01-31 13:35:56 +0100 |
commit | b23072b8814146d3a76eb752fd7526eb1575e7cc (patch) | |
tree | cf13a75e5570561a10bf68c2c451e9271229a3be /Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c | |
parent | e0cb38ac4330d5e09b5e21c74c5d5e453af99a4f (diff) | |
parent | ccd19e48ec9d557231bf923c338be0e7509a51d3 (diff) | |
download | cpython-b23072b8814146d3a76eb752fd7526eb1575e7cc.tar.gz |
merge 3.6
Diffstat (limited to 'Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c')
-rw-r--r-- | Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c b/Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c deleted file mode 100644 index fd07e50179..0000000000 --- a/Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Area: ffi_call - Purpose: Check return value double. - Limitations: none. - PR: none. - Originator: <andreast@gcc.gnu.org> 20050212 */ - -/* { dg-do run } */ -#include "ffitest.h" - -static double return_dbl(double dbl) -{ - printf ("%f\n", dbl); - return 2 * dbl; -} -int main (void) -{ - ffi_cif cif; - ffi_type *args[MAX_ARGS]; - void *values[MAX_ARGS]; - double dbl, rdbl; - - args[0] = &ffi_type_double; - values[0] = &dbl; - - /* Initialize the cif */ - CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, - &ffi_type_double, args) == FFI_OK); - - for (dbl = -127.3; dbl < 127; dbl++) - { - ffi_call(&cif, FFI_FN(return_dbl), &rdbl, values); - printf ("%f vs %f\n", rdbl, return_dbl(dbl)); - CHECK(rdbl == 2 * dbl); - } - exit(0); -} |