diff options
Diffstat (limited to 'testsuite/libffi.call/struct2_win32.c')
-rw-r--r-- | testsuite/libffi.call/struct2_win32.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/libffi.call/struct2_win32.c b/testsuite/libffi.call/struct2_win32.c index 2bfbdc5..5d02285 100644 --- a/testsuite/libffi.call/struct2_win32.c +++ b/testsuite/libffi.call/struct2_win32.c @@ -13,7 +13,7 @@ typedef struct double d2; } test_structure_2; -static test_structure_2 __attribute__ ((fastcall)) struct2(test_structure_2 ts) +static test_structure_2 __FASTCALL__ struct2(test_structure_2 ts) { ts.d1--; ts.d2--; @@ -29,6 +29,11 @@ int main (void) test_structure_2 ts2_arg; ffi_type ts2_type; ffi_type *ts2_type_elements[3]; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_2 *ts2_result = + (test_structure_2 *) malloc (sizeof(test_structure_2)); + ts2_type.size = 0; ts2_type.alignment = 0; ts2_type.type = FFI_TYPE_STRUCT; @@ -37,11 +42,6 @@ int main (void) ts2_type_elements[1] = &ffi_type_double; ts2_type_elements[2] = NULL; - - /* This is a hack to get a properly aligned result buffer */ - test_structure_2 *ts2_result = - (test_structure_2 *) malloc (sizeof(test_structure_2)); - args[0] = &ts2_type; values[0] = &ts2_arg; |