summaryrefslogtreecommitdiff
path: root/Modules/_ctypes/libffi/testsuite/libffi.call/many2.c
diff options
context:
space:
mode:
authordoko <doko@ubuntu.com>2017-01-31 13:35:56 +0100
committerdoko <doko@ubuntu.com>2017-01-31 13:35:56 +0100
commitb23072b8814146d3a76eb752fd7526eb1575e7cc (patch)
treecf13a75e5570561a10bf68c2c451e9271229a3be /Modules/_ctypes/libffi/testsuite/libffi.call/many2.c
parente0cb38ac4330d5e09b5e21c74c5d5e453af99a4f (diff)
parentccd19e48ec9d557231bf923c338be0e7509a51d3 (diff)
downloadcpython-b23072b8814146d3a76eb752fd7526eb1575e7cc.tar.gz
merge 3.6
Diffstat (limited to 'Modules/_ctypes/libffi/testsuite/libffi.call/many2.c')
-rw-r--r--Modules/_ctypes/libffi/testsuite/libffi.call/many2.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/Modules/_ctypes/libffi/testsuite/libffi.call/many2.c b/Modules/_ctypes/libffi/testsuite/libffi.call/many2.c
deleted file mode 100644
index 1c85746e4c..0000000000
--- a/Modules/_ctypes/libffi/testsuite/libffi.call/many2.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Area: ffi_call
- Purpose: Check uint8_t arguments.
- Limitations: none.
- PR: PR45677.
- Originator: Dan Witte <dwitte@gmail.com> 20100916 */
-
-/* { dg-do run } */
-
-#include "ffitest.h"
-
-#define NARGS 7
-
-typedef unsigned char u8;
-
-#ifdef __GNUC__
-__attribute__((noinline))
-#endif
-uint8_t
-foo (uint8_t a, uint8_t b, uint8_t c, uint8_t d,
- uint8_t e, uint8_t f, uint8_t g)
-{
- return a + b + c + d + e + f + g;
-}
-
-uint8_t ABI_ATTR
-bar (uint8_t a, uint8_t b, uint8_t c, uint8_t d,
- uint8_t e, uint8_t f, uint8_t g)
-{
- return foo (a, b, c, d, e, f, g);
-}
-
-int
-main (void)
-{
- ffi_type *ffitypes[NARGS];
- int i;
- ffi_cif cif;
- ffi_arg result = 0;
- uint8_t args[NARGS];
- void *argptrs[NARGS];
-
- for (i = 0; i < NARGS; ++i)
- ffitypes[i] = &ffi_type_uint8;
-
- CHECK (ffi_prep_cif (&cif, ABI_NUM, NARGS,
- &ffi_type_uint8, ffitypes) == FFI_OK);
-
- for (i = 0; i < NARGS; ++i)
- {
- args[i] = i;
- argptrs[i] = &args[i];
- }
- ffi_call (&cif, FFI_FN (bar), &result, argptrs);
-
- CHECK (result == 21);
- return 0;
-}