diff options
author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-26 16:28:02 +0000 |
---|---|---|
committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-26 16:28:02 +0000 |
commit | a65f362a3c42e66434f8dc85661121dd0b39f64e (patch) | |
tree | ef354e445015ccf6c34c675cf123ef8ca5128a8c /libffi/testsuite/libffi.call/struct1_win32.c | |
parent | 582018c37a8346022b2593beab799145ed146b19 (diff) | |
download | gcc-a65f362a3c42e66434f8dc85661121dd0b39f64e.tar.gz |
libffi merge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/testsuite/libffi.call/struct1_win32.c')
-rw-r--r-- | libffi/testsuite/libffi.call/struct1_win32.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libffi/testsuite/libffi.call/struct1_win32.c b/libffi/testsuite/libffi.call/struct1_win32.c index 4a7eb9444bd..b756f5ad8b5 100644 --- a/libffi/testsuite/libffi.call/struct1_win32.c +++ b/libffi/testsuite/libffi.call/struct1_win32.c @@ -14,7 +14,7 @@ typedef struct unsigned int ui; } test_structure_1; -static __attribute__ ((fastcall)) test_structure_1 struct1(test_structure_1 ts) +static test_structure_1 __FASTCALL__ struct1(test_structure_1 ts) { ts.uc++; ts.d--; @@ -30,6 +30,13 @@ int main (void) void *values[MAX_ARGS]; ffi_type ts1_type; ffi_type *ts1_type_elements[4]; + + test_structure_1 ts1_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_1 *ts1_result = + (test_structure_1 *) malloc (sizeof(test_structure_1)); + ts1_type.size = 0; ts1_type.alignment = 0; ts1_type.type = FFI_TYPE_STRUCT; @@ -39,11 +46,6 @@ int main (void) ts1_type_elements[2] = &ffi_type_uint; ts1_type_elements[3] = NULL; - test_structure_1 ts1_arg; - /* This is a hack to get a properly aligned result buffer */ - test_structure_1 *ts1_result = - (test_structure_1 *) malloc (sizeof(test_structure_1)); - args[0] = &ts1_type; values[0] = &ts1_arg; |